Skip to content

ci: run CI on pull requests to any base branch - #264

Closed
cunninghamcard-bit wants to merge 1 commit into
masterfrom
ci/run-ci-on-pull-requests-to-any-base-branch
Closed

cunninghamcard-bit wants to merge 1 commit into
masterfrom
ci/run-ci-on-pull-requests-to-any-base-branch

Conversation

@cunninghamcard-bit

@cunninghamcard-bit cunninghamcard-bit commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by li · project thread

Before: CI ran only on pull requests whose base is master. A stacked pull request, whose base is the branch of the pull request below it (for example #250 on #249), got no checks at all until everything under it had merged.

After: every pull request runs CI, whatever its base. Since #263, changes diffs the test merge commit against its first parent, the base branch head, so a stacked pull request runs only the jobs its own layer needs.

Running on every layer means one push low in a stack queues a run on each pull request above it, so a new push to a pull request now cancels that pull request's older run. Pushes to master each get their own concurrency group: GitHub also cancels a pending run in a group when another one queues, and changes diffs a push only against the one before it, so a documentation push queued behind a cancelled code push would have left that code untested on master.

This was split out of #262 so it can be reviewed on its own. #262 and #249 carry the same lines, byte for byte, so after this merges they merge with master without a conflict, and their diffs no longer show it.

How

  • on.pull_request loses branches: [master].
  • A top-level concurrency block: group ci-<workflow>-<PR number or commit SHA>, cancel-in-progress only for pull requests.

Checks

CI ran only on pull requests whose base is master, so a stacked pull
request, whose base is the branch of the pull request below it, got no
checks at all until everything under it had merged.

Every pull request now runs the workflow. "changes" diffs the test
merge commit against its first parent, the base branch head, so a
stacked pull request is checked for exactly its own layer.

Running on every layer of a stack means one push low in the stack
queues a run on each pull request above it. A new push to a pull
request now cancels its older run. Pushes to master each get their own
group, because GitHub also cancels a pending run in a group when
another one queues, and "changes" diffs a push only against the one
before it: a documentation push queued behind a cancelled code push
would have left that code untested on master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112xDERMUyD5JALkFhnsdWS
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