/github-workflows:promote-releasefrom github-workflows
Drives the automatic promote/<version> promotion PR into main on git-flow repos: confirm the release-please PR merged on develop, merge the promotion with a merge commit, and verify the release-please tag. Refuses on trunk repos — use /merge-pr.
Ships in github-workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
On git-flow repos (default develop, production main), the shared
JacobPEvans/.github/.github/workflows/_promotion-pr.yml workflow owns
promotion. It runs when a release commit (chore(develop): release <version>) lands on develop, on any push to main, and on a weekly cron.
It creates promote/<version> at the newest release commit on develop that
main lacks, opens a PR from promote/<version> to main titled
chore(release): promote <version> to main, and arms auto-merge with a merge
commit. At most one promotion is open at a time: merging it pushes main,
which opens the next promotion if one is waiting, and the branch is deleted
on merge.
While a promotion is open, develop is never frozen and carries no
promotion-state labels; work keeps landing on develop normally. The
promotion PR runs the full CI tier and the Main Source Gate, which accepts
develop, hotfix/<name>, and promote/<version> heads. Release-please
tags the release commit on main as before; if a newer release is still
waiting when the merge lands, its tag waits for the promotion that carries
it.
This skill confirms the release-please PR merged on develop, then drives
the open promotion PR to merged with a merge commit.
State warning: PR status, CI, and branch state change between invocations. Re-run every git/gh command from Step 0.
main. Never squash or rebase —
main's ruleset bans both. See /gh-cli-patterns Canonical
Default-Branch Detection.main.develop head into
main, no gh pr update-branch on it, no pushing to
promote/<version>. The shared workflow owns promotion branches, and the
release-please commit is never edited.develop and tags the
promoted commit on main.release/* stabilization branches are out of scope for this workflow.DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
If DEFAULT_BRANCH != develop, abort:
"This repo's default branch is
{DEFAULT_BRANCH}, notdevelop— it is not on the git-flow model. There is no promotion tomainhere; use/merge-prfor ordinary PRs into{DEFAULT_BRANCH}."
git fetch origin --force develop main
gh pr list --base develop --state merged --limit 20 \
--json number,headRefName,mergedAt \
--jq '.[] | select(.headRefName | startswith("release-please--"))'
The newest merged release-please PR's release commit
(chore(develop): release <version>) must be on origin/develop and ahead
of origin/main. Inspect what the promotion will carry:
git log --oneline origin/main..origin/develop # newest entry is the release commit
If develop has no commits ahead of main, stop and report: "develop
has no commits ahead of main — nothing to promote." If the newest
release-please PR is still open on develop, the PR Reconcile sweep merges
it once it is green and four hours old, so releases batch. For an urgent
release, or when the sweep is down, merge it now with
/merge-pr <RELEASE_PR_NUMBER> --squash, pinned to its head.
The shared promotion workflow creates the promotion PR automatically. Find it:
gh pr list --base main --state open --json number,headRefName,url \
--jq '.[] | select(.headRefName | startswith("promote/"))'
Use the PR it returns — it is titled chore(release): promote <version> to main and has auto-merge armed with a merge commit.
If none is open, stop and report: "No promotion PR is open. The promotion
workflow opens one automatically on the next release commit pushed to
develop or the next push to main." Never create a develop-headed PR
into main by hand.
Check that develop itself is green — gh run list --branch develop --limit 3 and the newest run must be complete/success — then check every check run
and commit status on the promotion PR's head, which includes the full CI
tier and the Main Source Gate (the gate accepts develop, hotfix/<name>,
and promote/<version> heads):
gh pr checks <PR_NUMBER>
gh api repos/<OWNER>/<REPO>/commits/<SHA>/check-runs
gh api repos/<OWNER>/<REPO>/commits/<SHA>/status
All must be green. If any check or status fails, stop and report the
failing checks: do not merge the promotion. Fix the failure through a PR on
develop; the next promotion carries the fix.
Run the canonical PR-readiness gate from /gh-cli-patterns against the promotion PR:
canMerge: true) with all mergeability flags clean.If any soft block remains, run /finalize-pr <PR_NUMBER> and re-run the
gate. If any hard block remains, stop and report — do not merge.
Invoke /merge-pr <PR_NUMBER>, which validates the promotion PR and merges
it into main with a merge commit — never squash, never rebase. The
promote/<version> branch is deleted on merge, and the push to main
triggers the shared workflow to open the next promotion if one is waiting.
Release-please tags the release commit on main as before. Verify the tag
and its content:
git fetch origin --tags
git ls-remote --tags origin
gh release view <VERSION>
git show <VERSION>:CHANGELOG.md
Report the promotion PR number and URL, the merged commit, and the verified tag. If a newer release was still waiting when this merge landed, its tag waits for the promotion that carries it — report that the next promotion is pending rather than inventing the tag.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jacobpevans-ai/claude-code-plugins --plugin github-workflows18 skills in this plugin
/finalize-prAutomatically finalize pull requests for merge by resolving CodeQL violations, PR feedback, merge conflicts, and CI failures. Handles single PR (current branch or by number), all open PRs in the repo, or all open PRs across the org. Includes bot-authored PRs in all modes./gh-cli-patternsCanonical reference for all gh CLI command shapes used by skills in this plugin. Defines the placeholder convention, default-branch (trunk vs git-flow) detection, allowed --json fields, GraphQL fallback rules, -f/-F/--raw-field flag semantics, the PR-readiness gate, required status contexts, the feedback ledger, code-scanning alert query, review-thread fetch/count/resolve mutations, and heredoc bodies. Prevents Unknown JSON field errors and divergent query shapes./