|
1 | 1 | --- |
2 | 2 | name: review-pr |
3 | 3 | description: >- |
4 | | - Review a PR on cloudserver (S3-compatible object |
5 | | - storage server in Node.js) |
| 4 | + Review a PR on cloudserver (S3-compatible object |
| 5 | + storage server in Node.js) |
6 | 6 | argument-hint: <pr-number-or-url> |
7 | 7 | disable-model-invocation: true |
8 | 8 | allowed-tools: >- |
9 | | - Bash(gh repo view *), Bash(gh pr view *), |
10 | | - Bash(gh pr diff *), Bash(gh pr comment *), |
11 | | - Bash(gh api *), Bash(git diff *), |
12 | | - Bash(git log *), Bash(git show *) |
| 9 | + Bash(gh repo view *), Bash(gh pr view *), |
| 10 | + Bash(gh pr diff *), Bash(gh pr comment *), |
| 11 | + Bash(gh api *), Bash(git diff *), |
| 12 | + Bash(git log *), Bash(git show *) |
13 | 13 | --- |
14 | 14 |
|
15 | 15 | # Review GitHub PR |
@@ -48,7 +48,6 @@ Parse `$ARGUMENTS` to extract the repo and PR number: |
48 | 48 | change (not just the diff hunks). |
49 | 49 |
|
50 | 50 | 3. **Analyze the changes** against these criteria: |
51 | | - |
52 | 51 | - **Async error handling** — uncaught promise rejections, missing |
53 | 52 | error callbacks, swallowed errors in streams. Double callbacks |
54 | 53 | in try/catch blocks (callback called in try then again in catch). |
@@ -113,23 +112,23 @@ Each inline comment must: |
113 | 112 | - When the fix is a concrete line change (not architectural), include |
114 | 113 | a GitHub suggestion block so the author can apply it in one click: |
115 | 114 |
|
116 | | - ````text |
117 | | - ```suggestion |
118 | | - corrected-line-here |
119 | | - ``` |
120 | | - ```` |
121 | | - |
122 | | - Only suggest when you can show the exact replacement. For |
123 | | - architectural or design issues, just describe the problem. |
124 | | - Example with a suggestion block: |
125 | | - |
126 | | - ```bash |
127 | | - gh api ... -f body=$'Missing the update.\ |
128 | | - <br><br>\n```suggestion\n\ |
129 | | - /plugin update shared-guidelines@hub\n\ |
130 | | - /plugin update scality-skills@hub\n\ |
131 | | - ```\n<br><br>— Claude Code' ... |
132 | | - ``` |
| 115 | + ````text |
| 116 | + ```suggestion |
| 117 | + corrected-line-here |
| 118 | + ``` |
| 119 | + ```` |
| 120 | +
|
| 121 | + Only suggest when you can show the exact replacement. For |
| 122 | + architectural or design issues, just describe the problem. |
| 123 | + Example with a suggestion block: |
| 124 | +
|
| 125 | + ````bash |
| 126 | + gh api ... -f body=$'Missing the update.\ |
| 127 | + <br><br>\n```suggestion\n\ |
| 128 | + /plugin update shared-guidelines@hub\n\ |
| 129 | + /plugin update scality-skills@hub\n\ |
| 130 | + ```\n<br><br>— Claude Code' ... |
| 131 | + ```` |
133 | 132 |
|
134 | 133 | - When the comment contains a suggestion block, use `$'...'` quoting |
135 | 134 | with `\n` for code fence boundaries. Escape single quotes as `\'` |
|
0 commit comments