Repository navigation
ci: run CI on pull requests to any base branch - #264
Closed
cunninghamcard-bit wants to merge 1 commit into
Closed
cunninghamcard-bit wants to merge 1 commit into
cunninghamcard-bit wants to merge 1 commit into
Conversation
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
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.
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,
changesdiffs 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
changesdiffs 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_requestlosesbranches: [master].concurrencyblock: groupci-<workflow>-<PR number or commit SHA>,cancel-in-progressonly for pull requests.Checks