linkupplatform/openclaw · Archived

merge-pr

Script-first deterministic squash merge with strict required-check gating, head-SHA pinning, and reliable attribution/commenting.

First seen Aug 1, 2026

Installation

$ npx skills add linkupplatform/openclaw --skill merge-pr

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from linkupplatform/openclaw · top by installs.

npx skills add linkupplatform/openclaw

Browse all from linkupplatform/openclaw

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,133 B
  • docs SUMMARY.md 145 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Merge PR

Overview

Merge a prepared PR only after deterministic validation.

Inputs

  • Ask for PR number or URL.
  • If missing, use .local/prep.env from the PR worktree.

Safety

  • Never use gh pr merge --auto in this flow.
  • Never run git push directly.
  • Require --match-head-commit during merge.
  • Wrapper commands are cwd-agnostic; you can run them from repo root or inside the PR worktree.

Execution Contract

  1. Validate merge readiness:
scripts/pr-merge verify <PR>

Backward-compatible verify form also works:

scripts/pr-merge <PR>
  1. Run one-shot deterministic merge:
scripts/pr-merge run <PR>
  1. Ensure output reports:
  • merge_sha=<sha>
  • mergeauthoremail=<email>
  • comment_url=<url>

Steps

  1. Validate artifacts
require=(.local/review.md .local/review.json .local/prep.md .local/prep.env)
for f in "${require[@]}"; do
  [ -s "$f" ] || { echo "Missing artifact: $f"; exit 1; }
done
  1. Validate checks and branch status
scripts/pr-merge verify <PR>
source .local/prep.env

scripts/pr-merge treats “no required checks configured” as acceptable ([]), but fails on any required fail or pending.

  1. Merge deterministically (wrapper-managed)
scripts/pr-merge run <PR>

scripts/pr-merge run performs:

  • deterministic squash merge pinned to PREPHEADSHA
  • reviewer merge author email selection with fallback candidates
  • one retry only when merge fails due to author-email validation
  • co-author trailers for PR author and reviewer
  • post-merge verification of both co-author trailers on commit message
  • PR comment retry (3 attempts), then comment URL extraction
  • cleanup after confirmed MERGED
  1. Manual fallback (only if wrapper is unavailable)
scripts/pr merge-run <PR>
  1. Cleanup

Cleanup is handled by run after merge success.

Guardrails

  • End in MERGED, never CLOSED.
  • Cleanup only after confirmed merge.