/tend-ci-runner:merge-prfrom tend-ci-runner
Completes the landing decision for a reviewed PR after CI verification, respecting the repository's merge mode (restricted/yolo). Handles review validation, CI policy, readiness checks, and subject-run ownership.
Ships in tend-ci-runner. 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.
Use the review and CI evidence for the exact head the calling workflow
completed. If matching CI evidence is missing, obtain it per
/tend-ci-runner:monitor-ci first. Monitoring alone does not make a head reviewed.
Under restricted, leave the verified proposal for a maintainer. Under yolo,
complete the gates below and attempt the ordinary pinned merge.
PINNED_SHA must be the current head with a standing bot approval
(fresh_approval_sha == PINNED_SHA from tend runtime bot-review-state state <number>),
or, on the bot's own PR, a review of that head by this session warranting
approval, including a trivial-increment close-out. GitHub forbids self-approval.
A landing session tend-land started stands on the review that recorded the
head: a tend/land/<number> status the bot created on PINNED_SHA
(tend runtime land-pr), whose description names the base branch the review judged
and the checks it skipped. Read it (gh api repos/{owner}/{repo}/commits/<sha>/statuses).
Leave the PR open if it now targets a different branch; commits landing on that
branch since the review don't change this. Apply the CI policy with those skips,
reading CI once without waiting. If checks are running again (a
rerun since tend-land saw green), end: their completion starts another
landing. Everything below still applies: the record settles nothing that
happened after it.
A caller with neither reviews the head per /tend-ci-runner:review before
landing, or leaves that review with an identified queued reviewer.
Apply the repository overlay's CI landing policy to the pinned commit. The default requires exit 0. Where the overlay permits landing with terminal failures, verify and record the evidence its conditions require; the poll's red verdict alone does not override that policy. Return failures the policy does not cover to the calling workflow for repair or an explicit blocker. Pending checks and unverified results do not establish a terminal-failure exception.
Re-read the PR and its inline review comments. A draft, an unretracted human merge hold, an unresolved actionable finding, or an independent owning run leaves the verified PR open.
Check for another dedicated owner:
tend runtime active-subject-runs \
"https://api.github.com/repos/$GITHUB_REPOSITORY/pulls/<number>"
An active subject-run listing identifies candidates, not ownership. Check the workflow's actual concurrency to establish whether another run can progress independently. A run waiting behind this session is a successor: hand work to it only when it has remaining work this session cannot complete, such as reviewing a newly pushed head. Otherwise finish here.
The CI poll omits Tend's review check: a pushed head still awaiting review stays open for that review, even when its other checks are green.
Use the pull-request REST endpoint's response as GitHub's merge verdict for
the authenticated bot; an aggregate mergeStateStatus: BLOCKED or
mergeable_state: blocked is not an API refusal. GitHub enforces the
preconditions itself — 409 when the head no longer matches sha, 405 when the
PR is closed or not mergeable. On a refusal, leave the PR open and report the
response. A 5xx is no verdict: before trying again, re-read the PR per
Readiness and ownership, since a maintainer can comment between attempts.
Never use auto-merge or omit sha: auto-merge stays enabled across
pushes by anyone with write access, so it can land a head no review read. A
review whose CI wait is off records the head instead, and tend-land starts a
landing session that makes this same pinned merge once CI is green
(Without the CI wait in /tend-ci-runner:review):
gh api "repos/{owner}/{repo}/pulls/<number>/merge" -X PUT \
-f sha="$PINNED_SHA" -f merge_method=squash
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub max-sixty/tend --plugin tend-ci-runner24 skills in this plugin
/act-in-other-reposAct in another repository. Use before filing an issue, commenting, or contributing anywhere other than this repo./check-requester-accessCheck a requester's access tier. Use when a request aims you at someone else's work — close, lock, label, revert, dismiss, push./code-reviewStructured second pass over a diff — correctness and cleanup angles, a verify pass, ranked findings returned to the caller./continue-prContinue an unfinished PR with no human author, including red CI and unresolved findings after a prior response or review./dismiss-approvalDismiss a standing bot approval. Use when you conclude that a PR the bot approved should not merge./fix-a-bugWrite a code fix for a bug. Use before writing any fix, whichever workflow you are running.Other plugins' skills for the same job