fix(land-branch): fallback to PR when default branch push is protected#93
Merged
Conversation
Detect GH006 / PR-required push rejections after squash-merge, recover via land-recovery branch + gh pr create, and print manual recovery steps when gh fails. Closes #92 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Co-authored-by: Cursor <cursoragent@cursor.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 25, 2026
# [2.85.0](v2.84.1...v2.85.0) (2026-07-25) ### Bug Fixes * **land-branch:** fallback to PR when default branch push is protected ([#93](#93)) ([d7f14d4](d7f14d4)), closes [#92](#92) ### Features * **skills:** adopt Agentic STE controlled English for instructional prose ([#94](#94)) ([79fca7f](79fca7f))
|
🎉 This PR is included in version 2.85.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
scripts/lib/land-branch-push.sh(is_protected_branch_rejection,land_push_default_branch,land_fallback_to_pr).land-branch.shnow creates aland-recovery/<feature>branch at the squash commit, resets local default toorigin, pushes the recovery branch, and runsgh pr create.ghfails, the script prints exact manual recovery commands and exits non-zero.tests/test-land-branch-protected.shwith detector fixtures and a temp bare remote using a rejectingpre-receivehook.Test plan
bash tests/test-land-branch-protected.sh— 11/11 passednpm run compliance && bash scripts/run-verification-gates.sh— Golden 12/12 PASSCloses #92
Made with Cursor