Skip to content

[DOC]: github_branch_protection status checks with matrix values don't work as documented #2417

Open

Description

@joscha

Expected Behavior

The documentation:

For workflows that use matrixes, append the matrix name to the value using the following pattern `(<matrix_value>[, <matrix_value>])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information.

i.e.:

For workflows that use matrixes, append the matrix name to the value using the following pattern (<matrix_value>[, <matrix_value>])

suggests that for a workflow file looking like this:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        avsc: [5.7.x, 6.0.0-alpha.14]
    steps:

(see actual file here)

something like this:

  required_status_checks {
    strict   = true
    contexts = ["build (5.7.x, 6.0.0-alpha.14)", "npm"]
  }

should produce status checks for each of the matrix items, but it doesn't.

Only specifying it like this:

  required_status_checks {
    strict   = true
    contexts = ["build (5.7.x)", "build (6.0.0-alpha.14)", "npm"]
  }

produces two separate required checks correctly.

I have tried finding the code that supposedly handles the special matrix notation, but couldn't find so in 5809617. Nor can I find it in the history or any other issues or mention of matrix related to it anywhere in the codebase.

If I am holding it wrong, please take my apologies. If you could point me to the code handling this special case, that would be great, too.

Actual Behavior

It produces a required status check that verbatim requires a name with all matrix values, which is never fulfilled.

Terraform Version

Terraform 1.9.7 on Mac OS 14.6.1 (23G93) with terraform-provider-github 6.2.1

Affected Resource(s)

  • github_branch_proctection

Terraform Configuration Files

No response

Steps to Reproduce

No response

Debug Output

# github_branch_protection.avsc-zstandard-codec-main will be updated in-place
  ~ resource "github_branch_protection" "avsc-zstandard-codec-main" {
        id                              = "BPR_kwDOMyV5ps4DPyW7"
        # (10 unchanged attributes hidden)

      ~ required_status_checks {
          ~ contexts = [
              - "build (5.7.x)",
              + "build (5.7.x, 6.0.0-alpha.14)",
                # (1 unchanged element hidden)
            ]
            # (1 unchanged attribute hidden)
        }
    }

Panic Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Status: Triage
    Type: Bug
    on Oct 9, 2024
  2. moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Activeon Oct 11, 2024
  3. added
    Status: Up for grabs
    and removed
    Status: Triage
    on Oct 11, 2024
  4. github-actions commented on Jul 9, 2025

    @github-actions

    👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

  5. added
    Status: Stale
    on Jul 9, 2025
  6. joscha commented on Jul 9, 2025

    @joscha
    Author

    I don't seem to have the rights to add labels to this, but it's definitely not stale.

  7. removed
    Status: Stale
    on Jul 10, 2025
  8. changed the title [-][BUG]: `github_branch_proctection` status checks with `matrix` values don't work as documented[/-] [+][BUG]: `github_branch_protection` status checks with `matrix` values don't work as documented[/+] on Jul 16, 2025
  9. deiga commented on Feb 11, 2026

    @deiga
    Collaborator

    Looking through the code there is no handling that would support how the docs could be understood. It seems to purely take the given list of strings and pass it along to the GH API.

    It seems like an oversight of adding docs for functionality that was supposed to come?

  10. added
    Type: Documentation
    on Feb 11, 2026
  11. added theissue type on Feb 11, 2026
  12. added this to the v6.12.0 Release milestone on Feb 11, 2026
  13. removed this from the v6.12.0 Release milestone on Feb 20, 2026
  14. removed
    Type: Bug
    on Feb 20, 2026
  15. changed the title [-][BUG]: `github_branch_protection` status checks with `matrix` values don't work as documented[/-] [+][DOC]: `github_branch_protection` status checks with `matrix` values don't work as documented[/+] on Feb 20, 2026
  16. added
    Type: Bug
    and removed
    Status: Up for grabs
    on Jul 22, 2026
  17. added this to the v6.14.0 milestone on Jul 22, 2026
  18. changed the issue type fromtoon Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugType: Documentationr/branch_protectionvNext

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions