A required status check never reports and the PR is stuck as "Expected — Waiting for status".
IntermediateScenarioProtection, Hooks and Policy
Answer
Situation read → The workflow did not run, was skipped by path filters, or the check name changed.
What I'd do →
- Check the workflow
on:triggers andpaths:filters. A skipped workflow leaves the check pending forever. - Confirm the required check name matches the job name exactly (matrix jobs add suffixes).
- Add a final always-run "gate" job that depends on the others and require only that.
gate:
if: always()
needs: [build, test]
runs-on: ubuntu-latest
steps:
- run: test "${{ contains(needs.*.result, 'failure') }}" = "false"
Why → One stable required check decouples protection from job renames and path filtering.
Interview tip → Know that a job skipped because of its own if: reports as success, but a workflow that never triggered reports nothing.
More on Protection, Hooks and Policy
You are asked to protect `main`. Which rules do you turn on?BeginnerClassic branch protection or repository rulesets: which do you use?IntermediateProduction is down and the fix needs to merge now, but approvals are required.IntermediateYou want to stop developers from committing obvious mistakes like debug prints, trailing whitespace or secrets.BeginnerHooks in `.git/hooks` are not shared with the team. How do you distribute them?IntermediateA developer bypasses your hook with `git commit --no-verify`. How do you enforce the rule anyway?Intermediate