Repository navigation
ci: check a pull request against the base it merges into - #79
Conversation
The version check and the one-package check diffed the merge checkout against the event's base.sha, which can be older than the base branch the pull request is merged into. A pull request behind main then counted main's newer commits as its own, as #72 did with openvpn-connect. The merge commit's first parent is the base it merges into.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
Package
None, this changes CI only.
Changes
Lint's Check versions and Check one package per pull request steps diffed the checkout against
github.event.pull_request.base.sha. The checkout is the pull request merged into the base branch, butbase.shacan be an older commit. When a pull request is behindmain,main's newer commits then count as part of the pull request.#72 hit this. Its branch started at
f76309e,mainhad since merged #64, and Lint failed withThis pull request changes 2 packages: dev-servers, openvpn-connectalthough #72 only touchesdev-servers.Both steps now pass
HEAD^1, the merge commit's first parent, which is the base the pull request merges into. The version check also reads earlier versions from that base, so it compares against everythingmainhas published, not only what was there when the branch started.Access
None.
Testing
0322c4e(parents9e736a4and3fa9d69), the one CI ran on../scripts/check-one-package.sh f76309ereproduces the failure../scripts/check-one-package.sh HEAD^1and./scripts/check-versions.sh HEAD^1pass.dev-serversthat keeps version 1.0.2 intomainwith--no-ff../scripts/check-versions.sh HEAD^1still fails withpackages/dev-servers changed but is still version 1.0.2.actionlintpasses onci.yml.ci.yml.Claude Opus 5.5 via Claude Code
Summary by cubic
Fixes the CI version and one-package checks so they diff against the base the pull request actually merges into instead of
base.sha, which can be older and caused main's newer commits to count as part of the pull request.HEAD^1, the merge commit's first parent, which is the base branch the pull request merges into.Written for commit 0cbea1d. Summary will update on new commits.
Summary by CodeRabbit