Prêt pour revue PR

Demander des relecteurs sur une pull request GitHub et/ou la marquer comme prête pour la revue en une étape. Les prénoms sont résolus en logins GitHub.

Spar Skills Guide Bot
DevOpsIntermédiaire
0026/07/2026
Claude CodeCursorWindsurfCopilot
#pr-review#github#automation#ready-for-review#reviewer

Recommandé pour


name: pr-ready description: "Request reviewers on a GitHub PR and/or mark it ready for review. Use when the user says 'tag <name> on the PR', 'add <name> as a reviewer', 'request review from <name>', 'mark this PR ready for review', 'add the ready-for-review label', or 'this PR is ready'. Friendly names like 'Alex' or 'Sam' are resolved to GitHub logins live via gh." stages: [ship]

PR Ready

Tag reviewers on a GitHub pull request and/or mark it ready for review, in one step. Friendly first names are resolved to GitHub logins live against the repo's collaborators — no stored map of people.

When to Use

Trigger when the user wants to hand a PR off for review, e.g.:

  • "Tag Alex on the PR" / "add Sam as a reviewer" / "request review from Sara"
  • "Mark this PR ready for review" / "add the ready-for-review label" / "this one's ready"
  • Any combination: "tag Alex and Sam and mark it ready"

Handles tag-only, ready-only, or both. Works on the current branch's PR, or an explicit PR number.

Variables

  • SCRIPT: scripts/pr-ready.sh — does the resolution + gh calls and prints a JSON summary.
  • LABEL: ready for review — created (green) if the repo lacks it.

How It Works

One script wraps the whole flow. The agent translates the request into a single call; the script resolves each friendly name to a collaborator login, requests reviewers, ensures the label exists, applies it, and prints the resulting reviewers + labels.

Instructions

  1. Determine the PR. If the user named a number (e.g. "#2713"), pass --pr 2713. Otherwise omit it — the script uses the current branch's PR.
  2. Collect intent. Gather the reviewer names the user mentioned, and whether they want it marked ready (the label).
  3. Run the script from inside the repo:
    scripts/pr-ready.sh [--pr <n>] [--reviewer <name>]... [--ready]
    
    Examples:
    • "tag Alex and Sam and mark #2713 ready" → scripts/pr-ready.sh --pr 2713 --reviewer Alex --reviewer Sam --ready
    • "mark this ready for review" → scripts/pr-ready.sh --ready
    • "add Sara as a reviewer" → scripts/pr-ready.sh --reviewer Sara
  4. Handle resolution failures. A friendly name is resolved against repo collaborator logins. If the script exits non-zero:
    • exit 3 (ambiguous) — it prints the candidate logins. Pick the right one (prefer the collaborator who authored commits in this repo / is an org member) and re-run with the exact login, or ask the user if genuinely unclear.
    • exit 4 (no match) — resolve the GitHub login yourself (gh api search/users, recent commit authors) and re-run with the exact login. Never tag a guessed stranger.
  5. Report the script's JSON summary back to the user: the PR url, requested reviewers, and labels now on it.

Scope

  • Does: request reviewers, create+apply the ready-for-review label, on one PR.
  • Does not: open/merge/close PRs, write PR descriptions, post comments, or approve reviews. It only hands a PR off for review.

Notes

  • Requires gh authenticated with rights on the repo; run from inside the repo.
  • No teammate map is stored — names resolve live, so the skill leaks no colleague handles. (If you ever want instant resolution, add a local, gitignored alias file; do not commit it.)
Skills similaires