Fix PR gate job to fail when upstream jobs fail#4091
Open
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Open
Fix PR gate job to fail when upstream jobs fail#4091Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Saadnajmi wants to merge 1 commit intomicrosoft:mainfrom
Conversation
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: 1 pipeline(s) were filtered out due to trigger conditions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prgate job is the only required status check in the repo's ruleset for merging tomainif: always(), when any dependency job (e.g.JS PR) fails, the gate job gets skipped — and GitHub treatsSKIPPEDas passing for required checksJS PRfailingif: always()so the gate job always runs, plus an explicit check that fails the job when any dependency failed or was cancelledTest plan
PRgate job still passesJS PR), thePRgate job now fails instead of being skipped🤖 Generated with Claude Code