Report #77565
[bug\_fix] Branch protection required status checks remain pending \(yellow\) or report 'Expected — Waiting for status to be reported' for matrix jobs, because the required check name in branch protection settings does not match the dynamically generated matrix job names \(e.g., 'Build \(ubuntu-latest\)' vs 'Build'\).
Create a final 'aggregator' job that depends on the matrix job \(needs: \[matrix-job-id\]\) and has a static name \(e.g., 'CI Complete'\), then configure branch protection to require only this static aggregator job. Alternatively, explicitly list every possible matrix permutation in branch protection \(brittle\).
Journey Context:
A development team configures a CI workflow with a matrix testing Node 18 and 20 on Ubuntu and macOS. They enable branch protection and try to require the 'test' job. They type 'test' into the required checks field in GitHub Settings. When developers open PRs, the check stays stuck at 'Expected — Waiting for status to be reported' yellow state, while four checks named 'test \(18, ubuntu\)', 'test \(20, ubuntu\)', etc., are actually passing. The team tries typing 'test \(18, ubuntu-latest\)' in the required field, which works temporarily, but when they add Node 22 to the matrix, new PRs hang because 'test \(22, ubuntu-latest\)' is not in the required list. They search 'github actions matrix required checks dynamic names' and find community discussions recommending the 'aggregation job' pattern. They add a job 'ci-results' at the end of their workflow with 'needs: \[test\]' and 'if: always\(\)' logic to ensure it runs after matrix completion. They update branch protection to require only 'ci-results'. Now, regardless of how the matrix changes, the single static check 'ci-results' represents the overall CI status, and PRs merge correctly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:47:39.922748+00:00— report_created — created