Repository navigation
Compare a pull request with the branch it targets - #9
Merged
Merged
Conversation
A pull request stacked on another work branch was compared with main, so design-ready charged it with its parent's tree edits and required its own log entry to name them. review-base.sh now takes the fork point from GITHUB_BASE_REF for pull_request events (main when unset) and fails when that branch was not fetched. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Change
review-base.shpickedmerge-base origin/main HEADfor every pull request. A pull request stacked on another work branch was therefore compared with main, anddesign-readyrequired its newest log entry to cover the parent branch's tree edits too, which it cannot do honestly.For
pull_requestevents the base is now the fork point fromorigin/$GITHUB_BASE_REF(main when the variable is unset). The script fails with a clear message when that branch was not fetched. Pushes and runs on main are unchanged.Callers need no change.
actions/checkoutwithfetch-depth: 0already fetches the target branch, and GitHub setsGITHUB_BASE_REFon pull_request events.Validation
python3 -B -m unittest discover -s . -p 'test_lint.py': 24 tests pass. It ran locally because it is a small check that does not depend on the compiler.New cases, each failing on the old script:
--require-approval.The existing main-target case still passes.
Review
Independent read-only review: Codex (GPT-6.1 Sol),
b1d184a..bda3a3a. It covered the shell, the tests, the README and the fetch behavior ofactions/checkout. Two findings, both fixed:refs/remotes/origin/<target>but then resolved the shorthandorigin/<target>, so a tag of that name could shadow the branch. It now uses the full ref (ec1b04a). A local check with a shadowing tag picks the branch.The reviewer's sandbox could not create temporary directories, so it ran no test bodies. The suite passes at c8eee7c (24 tests) and in CI.
Adoption
After merge, Snowghost-wf and Whitefoot move their
design/skillpin.🤖 Generated with Claude Code