trigger CI on stacked PRs - #152
Merged
Merged
Conversation
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.
Every CI workflow gates its
pull_requesttrigger onbranches: [main], so a PR that targetsany other branch never fires one. Stacked PRs target a feature branch by definition, so they
get no checks at all — and an empty check list reads as "nothing to report" rather than
"never ran", which is the dangerous part.
Seen live on #149: it had checks while its base was
main, and the moment it was retargetedonto
feat/flatten_backends_modulefor the #148 → #149 → #150 stack,gh pr checks 149started answering
no checks reported on the 'feat/simplify_methods' branch.Change
Drop the
branchesfilter frompull_requestinbuild.yaml,lint.yml,notebooks.yaml,test-slow.yamlandtest.yaml.push: branches: [main]is left alone, so branch pushes stilldo not double-run alongside the PR event, and
release.yamlis untouched (it triggers onpublished releases).
Each workflow already carries
concurrency: group: ${{ github.workflow }}-${{ github.ref }}with
cancel-in-progress: true, so every PR in a stack gets its own independently-cancelledrun group.
One consequence worth expecting: when a parent PR merges, GitHub re-targets the child and its
checks re-run against the new base. That is the behaviour you want from a stack — it is what
catches a child that only passed against the old parent.
Verification
All five files parse,
on.pull_requestresolves to null (all branches, default activity types),and
pre-commit run --all-filesis clean. The real check is this PR itself: it is based onmain, so it proves the workflows still fire on the default path. Retargeting any open PR ontoa feature branch after this merges is what proves the other half.