assign
Assign yourself as a reviewer on a PR.
Skip the web UI — claim review responsibility directly from the terminal.
When to Use
- Quick claim: “I want to review this before anyone else”
- Triage workflow: Pair with
delegatefor AI-assisted assignment - Scripting: Use
--jsonfor programmatic integrations - Batch operation: Use
--allto assign to all pending reviews at once
Synopsis
prctrl assign [OPTIONS] [PR_NUMBER]
Options
| Flag | Description | Default |
|---|---|---|
PR_NUMBER | PR number to assign yourself to (shorthand for --pr) | Required if no --pr |
-p, --pr | Global flag: target a specific PR number | - |
-a, --all | Assign yourself to all pending reviews at once | false |
-n, --pr-numbers | PR number(s) to assign (comma-separated, e.g. 123,456) | - |
-s, --since-days | Only show PRs created since this many days ago | - |
-n, --dry-run | Preview what would be assigned without actually assigning | false |
--json | Output as JSON for scripting | false |
-q, --quiet | Suppress per-PR progress messages (show only summary) | false |
--repo | Filter by repository name (partial match, case-insensitive) | - |
--author | Filter by author username (partial match, case-insensitive) | - |
-P, --priority | Show priority scores for each PR (1-5 stars based on age and size) | false |
Examples
# Assign to a specific PR
prctrl assign 4821
# Preview what would be assigned (dry-run)
prctrl assign --all --dry-run
# Assign using global --pr flag
prctrl --pr 4821 assign
# Assign to all pending reviews at once
prctrl assign --all
# Assign to multiple specific PRs
prctrl assign --pr-numbers 4821,4822,4823
# Assign with JSON output (for scripting)
prctrl assign 4821 --json
# Assign to all PRs created in the last 3 days
prctrl assign --all --since-days 3
# Assign with priority scores shown (to pick highest priority PRs)
prctrl assign --priority
JSON Output
When --json is used, returns an array of results:
[
{
"pr_number": 4821,
"pr_title": "Add user authentication",
"repo": "myorg/myrepo",
"url": "https://github.com/myorg/myrepo/pull/4821",
"success": true,
"error": null
}
]
Tips
- Use
--allto quickly assign yourself to ALL pending reviews without prompting - Use
--pr-numbersto assign to multiple specific PRs in one command - Use
--dry-runto preview what would be assigned before making changes - Parallel requests are used when assigning to multiple PRs for speed