Skip to content

feat(orchestration): merge-ready.sh — auto-merge owner-approved PRs + loop docs - #16

Merged
robercano merged 2 commits into
mainfrom
feat/auto-merge-loop
Jun 30, 2026
Merged

feat(orchestration): merge-ready.sh — auto-merge owner-approved PRs + loop docs#16
robercano merged 2 commits into
mainfrom
feat/auto-merge-loop

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Backports the missing merge step of the autonomous PR loop from the reDeploy instance. Complements notify-poll.sh (poll) and pr-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 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 (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) + the serialized "advance only when no PRs open" step (pr-feedback.sh was previously undocumented).
  • docs/GETTING_STARTED.md — note required checks need a paid plan on private repos; convention-based (approval+green) enforcement still holds.

Safety

merge-ready.sh 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 commits you havent reviewed — pushing after approval requires re-approval.

Note

Branched off pre-#15 main, rebased onto current main; settings.json reconciled to keep #15's notify-poll/pr-feedback entries and add merge-ready in the same :* style.

🤖 Generated with Claude Code

… 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
robercano force-pushed the feat/auto-merge-loop branch from 113630e to ce62655 Compare June 25, 2026 10:49

@robercano robercano left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@robercano
robercano merged commit 4cd2d5f into main Jun 30, 2026
6 checks passed
@robercano
robercano deleted the feat/auto-merge-loop branch June 30, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants