gh-pr-ready
npx machina-cli add skill dceoy/github-cli-agent-skills/gh-pr-ready --openclawFiles (1)
SKILL.md
915 B
GitHub PR Ready
When to use
- The user asks to mark a draft PR as ready for review.
- You need to convert a PR back to draft (
--undo).
Inputs to confirm
- PR number/URL/branch (or use current branch PR).
- Whether to mark ready or undo.
Workflow
- Verify auth:
gh --version gh auth status - Mark ready or undo:
gh pr ready 123 gh pr ready 123 --undo
Examples
# Mark current branch PR as ready
~ gh pr ready
Notes
- Without an argument,
gh pr readytargets the PR for the current branch.
References
- GitHub CLI manual: https://cli.github.com/manual/
gh pr ready --help
Source
git clone https://github.com/dceoy/github-cli-agent-skills/blob/main/skills/gh-pr-ready/SKILL.mdView on GitHub Overview
gh pr ready marks a draft PR as ready for review or converts it back to draft using the gh CLI. It accepts a PR number, URL, or branch, or defaults to the current branch PR when no argument is provided. This streamlines status changes during code review.
How This Skill Works
The command first verifies authentication via gh --version and gh auth status, then executes gh pr ready <target> or gh pr ready <target> --undo. If no target is provided, it targets the PR for the current branch.
When to Use It
- You want to mark a draft PR as ready for review.
- You need to convert an already ready PR back to draft (--undo).
- You want to operate on a PR identified by number, URL, or branch.
- You're working on the current branch and want to affect its PR without specifying an ID.
- You’re scripting a PR status change in automation and need a simple ready/undo command.
Quick Start
- Step 1: Verify auth: gh --version and gh auth status
- Step 2: Mark a specific PR as ready: gh pr ready 123
- Step 3: Or undo to draft: gh pr ready 123 --undo (or gh pr ready --undo for current branch)
Best Practices
- Confirm the target PR (number, URL, or branch) before running gh pr ready.
- Use --undo to revert a ready PR back to draft when review is paused.
- Authenticate with gh auth status and ensure gh is up to date.
- Prefer explicit PR references (number or URL) in scripts to avoid unintended changes.
- Check the PR status after running (e.g., gh pr view) to verify readiness.
Example Use Cases
- Mark the current branch PR as ready when its checks pass.
- Mark PR #456 as ready for review.
- Undo ready on PR #789 when changes are still needed.
- From a feature branch, mark the PR as ready without specifying an ID.
- In CI, automatically mark PRs as ready after successful QA checks.
Frequently Asked Questions
Add this skill to your agents