Repository navigation
ci(pr-checks): diff against the merge commit's first parent, not the frozen PR base - #840
Merged
Merged
Conversation
…frozen PR base pull_request.base.sha stays at the main tip of the PR's last push, while checkout builds refs/pull/N/merge onto the current main. Once main moves (a pin refresh, another app), base.sha..HEAD pulls in every app main touched since: #836 added one app but built and apply_extra-checked 19, because #837 had refreshed 18 pins in between. HEAD^1 is the main tip this run actually merged onto, so the diff is exactly the PR's effect. Applies to build-changed, the automation tripwire and the dead-link check.
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.
Problem
pull_request.base.shais the main tip at the PR's last push, butactions/checkoutbuildsrefs/pull/N/mergeonto the current main. When main moves while the PR is open (the twice-daily pin refresh makes this common),base.sha..HEADalso contains everything main merged since.Example: #836 added only
com.autonomylogic.openplceditor, but build-changed built 19 apps and downloaded every payload for the apply_extra check, because #837 refreshed 18 pins between the PR's push and its CI run.Fix
Use
git rev-parse HEAD^1(the merge commit's first parent, i.e. the main tip this run merged onto) as the diff base in all three places:Verified
Simulated the #836 merge ref locally (
b2226ae+817a3d4) and ranchanged-apps.sh: old base → 19 apps, new base →com.autonomylogic.openplceditoronly. actionlint: clean apart from the existingubuntu-26.04label notice.