prq-cli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/prq.js +35 -71
- package/package.json +1 -1
package/dist/bin/prq.js
CHANGED
|
@@ -6482,98 +6482,62 @@ Available actions: ${available}`);
|
|
|
6482
6482
|
// src/commands/skill.ts
|
|
6483
6483
|
var SKILL_CONTENT = `---
|
|
6484
6484
|
name: prq
|
|
6485
|
-
description: PR review queue manager. Use when the user wants to check their PR review queue, review PRs, nudge stale PRs, or manage code review workflow. Triggers on mentions of "review queue", "PRs waiting", "stale PRs", "what needs review", or "prq".
|
|
6485
|
+
description: PR review queue manager. Use when the user wants to check their PR review queue, review PRs, nudge stale PRs, open PRs, or manage code review workflow. Triggers on mentions of "review queue", "PRs waiting", "stale PRs", "what needs review", "open PR", "nudge", or "prq".
|
|
6486
6486
|
---
|
|
6487
6487
|
|
|
6488
|
-
# PRQ
|
|
6488
|
+
# PRQ CLI
|
|
6489
6489
|
|
|
6490
|
-
|
|
6490
|
+
\`prq\` is a CLI tool for managing code review queues. It's installed on this machine.
|
|
6491
6491
|
|
|
6492
|
-
##
|
|
6493
|
-
|
|
6494
|
-
Run this command to get the user's current review queue:
|
|
6492
|
+
## Commands
|
|
6495
6493
|
|
|
6496
6494
|
\`\`\`bash
|
|
6495
|
+
# Show the review queue (JSON for parsing)
|
|
6497
6496
|
prq status --json
|
|
6498
|
-
\`\`\`
|
|
6499
6497
|
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
- **stale** — PRs with no activity for N days
|
|
6504
|
-
- **waiting-on-others** — PRs the user authored that are waiting on someone else
|
|
6498
|
+
# Open a PR in the browser
|
|
6499
|
+
prq open <number>
|
|
6500
|
+
prq open <owner/repo#number>
|
|
6505
6501
|
|
|
6506
|
-
|
|
6502
|
+
# Open files changed tab for review
|
|
6503
|
+
prq review <number>
|
|
6507
6504
|
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
- The title
|
|
6512
|
-
- The detail (e.g., "new commits since your review 2d ago")
|
|
6505
|
+
# Post a nudge comment on a stale PR
|
|
6506
|
+
prq nudge <number> --yes
|
|
6507
|
+
prq nudge <number> --message "Custom message" --yes
|
|
6513
6508
|
|
|
6514
|
-
|
|
6509
|
+
# Run any configured action
|
|
6510
|
+
prq run <action> <number>
|
|
6511
|
+
\`\`\`
|
|
6515
6512
|
|
|
6516
|
-
##
|
|
6513
|
+
## JSON output
|
|
6517
6514
|
|
|
6518
|
-
|
|
6515
|
+
\`prq status --json\` returns:
|
|
6519
6516
|
|
|
6520
6517
|
\`\`\`json
|
|
6521
6518
|
{
|
|
6522
|
-
"
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6519
|
+
"user": "caio-pizzol",
|
|
6520
|
+
"prs": [
|
|
6521
|
+
{
|
|
6522
|
+
"category": "needs-re-review",
|
|
6523
|
+
"repo": "org/repo",
|
|
6524
|
+
"number": 2439,
|
|
6525
|
+
"title": "fix: something",
|
|
6526
|
+
"author": "alice",
|
|
6527
|
+
"url": "https://github.com/org/repo/pull/2439",
|
|
6528
|
+
"detail": "New commits since your review 1d ago"
|
|
6529
|
+
}
|
|
6530
|
+
]
|
|
6526
6531
|
}
|
|
6527
6532
|
\`\`\`
|
|
6528
6533
|
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
For each action template:
|
|
6532
|
-
- **Starts with \`/\`** — it's a Claude Code skill. Invoke it by running the skill with the interpolated value. For example, \`/review https://github.com/org/repo/pull/123\`
|
|
6533
|
-
- **Starts with \`shell:\`** — it's a shell command. Run it with the Bash tool. For example, \`prq nudge 123 --yes\`
|
|
6534
|
-
- **Otherwise** — treat it as a prompt. Send it as a message.
|
|
6535
|
-
|
|
6536
|
-
### Template variables
|
|
6537
|
-
|
|
6538
|
-
Replace these in the action template:
|
|
6539
|
-
- \`{url}\` — full PR URL
|
|
6540
|
-
- \`{number}\` — PR number
|
|
6541
|
-
- \`{owner}\` — repo owner
|
|
6542
|
-
- \`{repo}\` — repo name
|
|
6543
|
-
- \`{title}\` — PR title
|
|
6544
|
-
- \`{author}\` — PR author
|
|
6545
|
-
|
|
6546
|
-
### Default actions (if no config found)
|
|
6547
|
-
|
|
6548
|
-
If no actions are configured, use these defaults:
|
|
6549
|
-
- **review** — invoke \`/review {url}\` if the /review skill exists, otherwise run \`prq review {number}\` to open files changed in browser
|
|
6550
|
-
- **nudge** — run \`prq nudge {number} --yes\`
|
|
6551
|
-
- **open** — run \`prq open {number}\`
|
|
6552
|
-
|
|
6553
|
-
## Step 4: Batch operations
|
|
6554
|
-
|
|
6555
|
-
If the user says things like "review all needs-re-review PRs" or "nudge all stale PRs":
|
|
6556
|
-
|
|
6557
|
-
1. Filter the queue JSON by the requested category
|
|
6558
|
-
2. Confirm the list with the user: "I'll review these 3 PRs: #2439, #2380, #2352. Proceed?"
|
|
6559
|
-
3. Execute the action on each PR sequentially
|
|
6560
|
-
|
|
6561
|
-
## Examples
|
|
6562
|
-
|
|
6563
|
-
**User:** "check my review queue"
|
|
6564
|
-
→ Run \`prq status --json\`, present results, ask what to do
|
|
6565
|
-
|
|
6566
|
-
**User:** "review 2439"
|
|
6567
|
-
→ Look up action for "review", interpolate with PR data, execute
|
|
6568
|
-
|
|
6569
|
-
**User:** "nudge all stale PRs"
|
|
6570
|
-
→ Filter stale PRs from queue, confirm, run nudge on each
|
|
6534
|
+
Categories: \`needs-re-review\`, \`requested\`, \`stale\`, \`waiting-on-others\`.
|
|
6571
6535
|
|
|
6572
|
-
|
|
6573
|
-
→ Run \`prq status --json\`, show only needs-re-review and requested categories
|
|
6536
|
+
## Usage
|
|
6574
6537
|
|
|
6575
|
-
|
|
6576
|
-
|
|
6538
|
+
- When the user asks about their review queue, run \`prq status --json\` and present the results grouped by category.
|
|
6539
|
+
- When the user asks to open, review, or nudge a PR, use the corresponding \`prq\` command.
|
|
6540
|
+
- For batch operations ("nudge all stale PRs"), filter the JSON output and confirm with the user before acting.
|
|
6577
6541
|
`;
|
|
6578
6542
|
function skillCommand(global) {
|
|
6579
6543
|
if (global) {
|