Skip to content

Keep agent-branch-finish fully automatic after PR merges#16

Merged
NagyVikt merged 1 commit intomainfrom
agent/codex/20260411-135657-pia-edix-hu-dup-2-branch-finish-pr-delete-error
Apr 11, 2026
Merged

Keep agent-branch-finish fully automatic after PR merges#16
NagyVikt merged 1 commit intomainfrom
agent/codex/20260411-135657-pia-edix-hu-dup-2-branch-finish-pr-delete-error

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Automated by scripts/agent-branch-finish.sh (PR flow).

When GitHub merges a PR but fails only on local branch deletion (active worktree), the finish script previously treated that as a merge failure and skipped cleanup. This patch detects that specific gh error signature, treats merge as successful, and continues local/remote branch cleanup.

Constraint: Preserve existing PR fallback behavior for true policy/check blockers
Rejected: Retrying gh merge without --delete-branch | still leaves local/remote cleanup fragmented across manual steps
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If gh merge output format changes, keep this matcher aligned with real CLI error text before loosening detection
Tested: npm test (44/44), including new regression for local-branch-delete error path in PR mode
Not-tested: Live GitHub PR merge with this exact local-delete failure on every gh version
@NagyVikt NagyVikt merged commit 193bb4f into main Apr 11, 2026
7 checks passed
@NagyVikt NagyVikt deleted the agent/codex/20260411-135657-pia-edix-hu-dup-2-branch-finish-pr-delete-error branch April 11, 2026 12:00
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