Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

github-auto-merge-setup

БесплатноБез исполняемых скриптовНе проверен

Diagnose and fix 'gh pr merge --auto' failures and set up CI-green auto-merge for GitHub repos/workflows. Use when: 'gh pr merge --auto' or a workflow merge…

ericmjlот ericmjl★ 45 звёзд на GitHub

Об этом скилле

Github Auto Merge Setup

Diagnose and fix 'gh pr merge --auto' failures and set up CI-green auto-merge for GitHub repos/workflows. Use when: 'gh pr merge --auto' or a workflow's merge step fails with 'Auto merge is not allowed for this repository (enablePullRequestAutoMerge)', 'Protected branch rules not configured for this branch (enablePullRequestAutoMerge)', or auto-merge silently not working; you need to enable auto-merge ('auto merge if CI is green') for scheduled dependency-update workflows (dependabot, update-ollama-models, pre-commit autoupdate); you are adding a ruleset / branch protection with required status checks and need to know WHICH checks are safe to require; or you are choosing merge flags (--rebase/--squash) for a repo that may disallow some merge methods. Covers the THREE-LAYER gate stack: (1) repo allow_auto_merge setting, (2) merge-method permission (rebase-only repos reject --squash), (3) base-branch protection with required checks — all three must hold or auto-merge refuses; plus required-check selection rules (only checks reporting on every PR; matrix jobs required with parameter suffixes) and the one-command diagnosis: gh api repos/{owner}/{repo} --jq '{allow_auto_merge, allow_squash_merge, allow_rebase_merge, allow_merge_commit}'. ALSO use when: a release workflow's direct push to main is rejected with GH013 repository rule violations; a green release job published PyPI/tag/release but main never got the 'Bump version' commit (half-landed release); or every subsequent release dies at the 'version already on PyPI' guard after a required-checks ruleset was added to mainALSO use when: 'gh pr merge --admin' appears to no-op (payload fragment ' (mergePullRequest)') and the PR stays BLOCKED under a ruleset — rulesets do NOT exempt repo admins/owners by default (unlike classic branch protection), only explicit bypass_actors can; or a PR shows 'N of M required status checks are expected' / BLOCKED with all-green checks — run the three-surface diff: ruleset required names vs statusCheckRollup vs GET /commits/{sha}/check-runs. Sibling of github-actions-token-pr-creation-permission (a different repo-level Actions switch).

Instructions

TODO: Add specific instructions based on observed patterns.

## The Three-Layer Auto-Merge Gate

  • GitHub enables auto-merge (merge-when-green) ONLY when all THREE independent conditions hold. Diagnose top-down; a failure at any layer produces a DIFFERENT error:

LAYER 1 — Repo setting allow_auto_merge (default OFF).

  • Symptom: 'GraphQL: Auto merge is not allowed for this repository (enablePullRequestAutoMerge)'.
  • Fix: gh api -X PATCH repos/{owner}/{repo} -f allow_auto_merge=true
  • Workflow YAML CANNOT enable this — it is a repo-level switch (same structural class as the PR-creation switch in github-actions-token-pr-creation-permission).

LAYER 2 — Merge-method permission.

  • Symptom: merge command fails on a repo that disallows the requested method, e.g. --squash on a rebase-only repo.
  • Fix: use the method the repo allows. Check: gh api repos/{owner}/{repo} --jq '{allow_squash_merge, allow_rebase_merge, allow_merge_commit}'.
  • llamabot fact: rebase-only — never --squash there.

LAYER 3 — Base-branch protection with blocking requirements.

  • Symptom: layers 1-2 fixed, yet 'gh pr merge --auto --rebase' STILL fails: 'Protected branch rules not configured for this branch (enablePullRequestAutoMerge)'.
  • Root cause: auto-merge DEFERS the merge until blocking requirements (required status checks / reviews) are satisfied. With NO branch protection on the base branch there is nothing to wait for, so GitHub refuses to enable auto-merge at all. (Counterintuitive: protection must be ADDED to get automatic merging.)
  • Fix: create a ruleset (or classic branch protection) on main with required status checks. Verify existing state first: gh api repos/{owner}/{repo}/rulesets --jq '.[].name' (empty = none) and gh api repos/{owner}/{repo}/branches/main/protection.

ONE-COMMAND DIAGNOSIS (run before writing any merge flags): gh api repos/{owner}/{repo} --jq '{allow_auto_merge, allow_squash_merge, allow_rebase_merge, allow_merge_commit}'

## Required-Check Selection Rules (Layer 3)

  • A required status check that never reports BLOCKS merging forever. Before requiring a check:
  1. ONLY require checks that run on EVERY PR. Read each workflow's 'on: pull_request:' trigger in the YAML — do not guess from a previous PR's check list. Conditional/filtered jobs are traps:
    • WIP bot (marketplace): reports only on WIP/draft PRs — requiring it blocks normal PRs.
    • check-changes / path-filtered jobs: may be skipped on unrelated changes.
    • '(Dry Run) Publish' steps: may be gated behind label/branch conditions.
  2. Matrix jobs are required WITH their parameter suffix: 'unit-tests (Python 3.13, pixi)' is a distinct check name from 'unit-tests (Python 3.12, pixi)' — each combination must be listed (or use a check-name that is reported per-matrix and require the pa
Полный SKILL.md на GitHub

Установить github-auto-merge-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл github-auto-merge-setup?

Diagnose and fix 'gh pr merge --auto' failures and set up CI-green auto-merge for GitHub repos/workflows. Use when: 'gh pr merge --auto' or a workflow merge step fails with an enablePullRequestAutoMerge error; auto-merge silently not working; enabling auto-merge for scheduled dependency-update workflows (dependabot etc.); adding a ruleset/branch protection with required status checks and choosing safe required checks; choosing merge flags (--rebase/--squash); a release workflow's push to main rejected with GH013 rule violations; a half-landed release (PyPI/tag published but main never got the 'Bump version' commit, or releases dying at the 'already on PyPI' guard); 'gh pr merge --admin' no-opping while the PR stays BLOCKED under a ruleset (admins are NOT exempt; only bypass_actors); or 'N of M required status checks are expected'. The three-layer gate stack and one-command diagnosis live in the body.

Как установить скилл github-auto-merge-setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл github-auto-merge-setup запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить github-auto-merge-setup с