Skip to content

Switch from GitHub auto-merge to manual merge-after-ci skill - #26

Merged
robdevops merged 3 commits into
mainfrom
claude/merge-after-ci
Oct 7, 2026
Merged

robdevops merged 3 commits into
mainfrom
claude/merge-after-ci

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Replace the auto-merge skill with a new merge-after-ci skill that handles PR merging differently.

Summary

The bot now merges claude/* PRs itself once CI passes, rather than relying on GitHub's auto-merge feature. This removes the dependency on repository settings ("Allow auto-merge") and the check required status.

Changes

  • Removed .claude/skills/auto-merge/SKILL.md: The old skill that enabled GitHub's auto-merge feature
  • Added .claude/skills/merge-after-ci/SKILL.md: New skill that:
    • Subscribes to PR activity events to detect when CI completes
    • Reads fresh PR state (mergeable_state, check runs, reviews) before merging
    • Merges only when all conditions are met: mergeable_state is clean, all checks pass, no blocking reviews
    • Uses merge_pull_request with expectedHeadSha to prevent race conditions
    • Handles CI failures and conflicts with appropriate error messages
  • Updated CLAUDE.md: Reflects the new merging approach and removes references to GitHub auto-merge configuration requirements

Implementation details

The new skill is more robust: it actively monitors PR state rather than passively relying on GitHub's auto-merge, and it can fix small CI issues by pushing fixes and waiting for the next check run. It never uses GitHub's auto-merge feature or the CI button's auto-merge boxes.

https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw

claude added 3 commits October 7, 2026 23:47
Renames auto-merge to merge-after-ci. Subscribe to the PR, merge it (merge commit, pinned to the head
SHA) when check has passed and the PR is clean with no changes requested, and stay silent.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Replaces merge-after-ci. Checks CI and mergeability fresh, merges on request with a pinned head SHA,
and replies in one line. No subscribing, no watching, no GitHub auto-merge.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
@robdevops
robdevops merged commit f7d0914 into main Oct 7, 2026
1 check passed
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