fix(workflows): scope aux PR checks so promote PRs spawn no runs - #480
Merged
Conversation
The job-level guard added earlier stops enforce-pr-target / pr-title-check from FAILING on PipeCraft promotion PRs, but the workflow runs are still created and sit as approval-gated (action_required) noise — the approval gate is evaluated before the job `if`. Scope the triggers so promotion PRs (which target downstream branches) don't match at all: - pr-title-check → pull_request.branches: [<initialBranch>] (contributor PRs) - enforce-pr-target → pull_request.branches: [<finalBranch>] (its only concern) Promote PRs to intermediate branches now spawn neither check. The job-level guards remain as defense for promotion PRs that do target the final branch (enforce-pr-target still triggers there, but skips instead of failing). Verified: a gated promotion PR to an intermediate branch produces no aux runs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Follow-up to #474. The job-level guard stopped
enforce-pr-target/pr-title-checkfrom failing on promotion PRs, but the runs were still created and sat as approval-gatedaction_requirednoise (the approval gate is evaluated before the jobif).Scope the triggers so promotion PRs (which target downstream branches) don't match the workflow at all:
pr-title-check→pull_request.branches: [<initialBranch>](contributor PRs only land on initial)enforce-pr-target→pull_request.branches: [<finalBranch>](its only job is rejecting PRs to final)Promote PRs to intermediate branches now spawn neither check. The job-level guards from #474 remain as defense for the one case that still triggers (a promotion PR whose base IS the final branch — enforce-pr-target fires there but skips instead of failing).
Test updated to assert both the guard and the trigger scoping. Full suite green (587); snapshots unaffected.
🤖 Generated with Claude Code