Skip to content

fix(merge): surface real --admin error on review-blocked PRs#319

Merged
drn merged 1 commit into
masterfrom
argus/2026-06-22-181137-fix-merge
Jun 23, 2026
Merged

fix(merge): surface real --admin error on review-blocked PRs#319
drn merged 1 commit into
masterfrom
argus/2026-06-22-181137-fix-merge

Conversation

@drn

@drn drn commented Jun 23, 2026

Copy link
Copy Markdown
Owner

do_merge captured only the auto-merge tier's error on review-blocked PRs, swallowing the real --admin failure and misreporting "no admin". Surface the actual admin error and reword exit-4 to point at pending required checks.

Co-Authored-By: Claude noreply@anthropic.com

When a PR is review-blocked (REVIEW_REQUIRED/CHANGES_REQUESTED), do_merge
tried `--admin` then `--auto`, but the auto-merge tier overwrote LAST_GH_ERR
before the exit-4 die — so the admin tier's real failure was swallowed and
only the (often misleading) auto-merge error surfaced. With auto-merge
disabled, this made /merge report "no admin" even when the operator held
repo admin and the true cause was a pending required status check.

- Capture the admin tier's stderr into a local before the auto-merge tier
  runs, log it (`Admin merge failed: …`), and include both the admin and
  auto-merge errors in the exit-4 message.
- Reword exit-4 (script + SKILL.md) to stop asserting "no admin"; point at a
  pending required status check as the likely cause (gh refuses an admin
  merge until required checks resolve) and branch guidance on the real error.

Squash worktree auto-switch is unaffected — MERGE_METHOD_BASE still set on
every success path (verified).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@drn drn force-pushed the argus/2026-06-22-181137-fix-merge branch from 8a354d4 to b9c2a34 Compare June 23, 2026 22:05
@drn drn merged commit 837e281 into master Jun 23, 2026
@drn drn deleted the argus/2026-06-22-181137-fix-merge branch June 24, 2026 00:17
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.

1 participant