Skip to content

fix(workflows): scope aux PR checks so promote PRs spawn no runs - #480

Merged
jamesvillarrubia merged 1 commit into
developfrom
fix/aux-workflows-scope-triggers
Jun 26, 2026
Merged

fix(workflows): scope aux PR checks so promote PRs spawn no runs#480
jamesvillarrubia merged 1 commit into
developfrom
fix/aux-workflows-scope-triggers

Conversation

@jamesvillarrubia

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #474. The job-level guard stopped enforce-pr-target/pr-title-check from failing on promotion PRs, but the runs were still created and sat 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 the workflow at all:

  • pr-title-checkpull_request.branches: [<initialBranch>] (contributor PRs only land on initial)
  • enforce-pr-targetpull_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

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.
@jamesvillarrubia
jamesvillarrubia merged commit 4fa996b into develop Jun 26, 2026
15 checks passed
@jamesvillarrubia
jamesvillarrubia deleted the fix/aux-workflows-scope-triggers branch June 26, 2026 17:57
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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