Bug: post-merge hook fires on failed merges #134
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/claude-custom#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
plan-pal-e-agency→ Process enforcement — standalone, discovered during operationsRepo
forgejo_admin/claude-customWhat Broke
The
PostToolUse:mcp__forgejo__merge_approved_prhook fires "PR merged successfully. You MUST run /update-docs NOW" regardless of whether the merge actually succeeded. When the API returns 405 (merge blocked by CI checks), the hook still tells the agent to run /update-docs — which would update docs for a merge that never happened.Observed during session: 3 consecutive merge attempts on PR #124 returned 405 errors, and the hook fired "BLOCKING REQUIREMENT" each time.
Repro Steps
mcp__forgejo__merge_approved_prreturns{"error": true, "status_code": 405}Expected Behavior
Hook should check the tool result for
"merged": truebefore firing the /update-docs requirement. If the merge failed, the hook should either stay silent or say "Merge failed — check CI checks."Environment
~/claude-custom/hooks/(PostToolUse handler formcp__forgejo__merge_approved_pr)Acceptance Criteria
"merged": truein tool resultRelated
pal-e-agency— projectsop-post-merge-docs— the SOP the hook enforces