Skip to content

Fix PR gate job to fail when upstream jobs fail#4091

Open
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Saadnajmi:fix/pr-gate-job-always-run
Open

Fix PR gate job to fail when upstream jobs fail#4091
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Saadnajmi:fix/pr-gate-job-always-run

Conversation

@Saadnajmi
Copy link
Copy Markdown
Collaborator

Summary

  • The pr gate job is the only required status check in the repo's ruleset for merging to main
  • Without if: always(), when any dependency job (e.g. JS PR) fails, the gate job gets skipped — and GitHub treats SKIPPED as passing for required checks
  • This allowed PR Remove overflow hidden from Button for Win32/Windows #4087 to merge despite JS PR failing
  • Adds if: always() so the gate job always runs, plus an explicit check that fails the job when any dependency failed or was cancelled

Test plan

  • Verify that when all jobs pass, the PR gate job still passes
  • Verify that when any job fails (e.g. JS PR), the PR gate job now fails instead of being skipped

🤖 Generated with Claude Code

The `pr` gate job is the only required status check for merging.
Without `if: always()`, when any dependency job fails, the gate job
gets skipped — and GitHub treats skipped as passing, allowing PRs
with failing checks to be merged (e.g. microsoft#4087).

This adds `if: always()` so the gate job always runs, and an explicit
check that fails the job when any dependency failed or was cancelled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant