feat(orchestration): merge-ready.sh — auto-merge owner-approved PRs + loop docs - #16
Merged
Conversation
… loop docs Backports the missing *merge* step of the autonomous PR loop from the reDeploy instance. Complements the existing notify-poll.sh (poll) and pr-feedback.sh (address change-requests, from #15): nothing yet merged owner-approved PRs. - merge-ready.sh (new): merges every open PR the owner has APPROVED that is mergeable and CI-green, then deletes the branch. The human Approve is the only gate — the script never approves. Safety: merges only if the approval was submitted at/after the PR's last commit, so a free private repo (no branch protection to dismiss stale approvals) never auto-merges unreviewed commits. Generic: repo via git remote (or $1), approver = repo owner (or $MERGE_APPROVER), base from gates.json merge.baseBranch. Uses ambient gh auth (merging is an owner action; only PR creation uses the bot). - notify-poll.sh: adds a cursor-independent "open pr status" section (per PR: latest owner review, CI rollup, mergeable) — merge-readiness is a state, not an event. - settings.json: pre-approve merge-ready.sh. - docs/USAGE.md: document the full 3-script loop (poll → pr-feedback → merge-ready) and the serialized "advance to next issue only when no PRs open" step. - docs/GETTING_STARTED.md: note that required status checks need a paid plan on private repos; convention-based enforcement via approval+green still holds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
robercano
force-pushed
the
feat/auto-merge-loop
branch
from
June 25, 2026 10:49
113630e to
ce62655
Compare
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.
Backports the missing merge step of the autonomous PR loop from the reDeploy instance. Complements
notify-poll.sh(poll) andpr-feedback.sh(address change-requests, #15) — nothing here yet merged owner-approved PRs.What
merge-ready.sh(new) — merges every open PR the owner has APPROVED that is mergeable + CI-green, then deletes the branch. The human Approve is the only gate; the script never approves. Generic: repo from git remote (or$1), approver = repo owner (or$MERGE_APPROVER), base fromgates.jsonmerge.baseBranch. Uses ambientghauth (merging is an owner action; only PR creation uses the bot).notify-poll.sh— adds a cursor-independentopen pr statussection (latest owner review, CI rollup, mergeable): merge-readiness is a state, not an event.settings.json— pre-approvemerge-ready.sh.Safety
merge-ready.shmerges only if the approval was submitted at/after the PR's last commit, so a free private repo (no branch protection to dismiss stale approvals) never auto-merges commits you havent reviewed — pushing after approval requires re-approval.Note
Branched off pre-#15
main, rebased onto currentmain;settings.jsonreconciled to keep #15'snotify-poll/pr-feedbackentries and addmerge-readyin the same:*style.🤖 Generated with Claude Code