feat: use GitHub suggestion syntax in PR reviewer comments#47508
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage
Score Breakdown: Impact 15 · Urgency 10 · Quality 10 DRAFT PR updating reviewer workflows to use GitHub suggestion syntax. Low-urgency improvement — no CI data available. Defer until author marks ready for review.
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done — |
There was a problem hiding this comment.
Pull request overview
Updates PR reviewer workflows to generate one-click GitHub code suggestions.
Changes:
- Adds
suggestion-block guidance and examples. - Retains
<details>as a fallback for structural fixes. - Refreshes generated workflow metadata.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pr-code-quality-reviewer.md |
Updates review-comment instructions. |
.github/workflows/pr-code-quality-reviewer.lock.yml |
Refreshes generated metadata. |
.github/workflows/mattpocock-skills-reviewer.md |
Adds suggestion guidance and examples. |
.github/workflows/mattpocock-skills-reviewer.lock.yml |
Refreshes generated metadata. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (2)
.github/workflows/pr-code-quality-reviewer.md:140
- This preference conflicts with the existing Review Formatting rule at line 193, which still requires every code suggestion to be wrapped in
<details>. With both instructions present, the reviewer may continue producing the old non-applicable format. Update that rule to exempt direct GitHub suggestions.
- **GitHub suggestion** (preferred when the fix maps to the commented lines): use a ` ```suggestion ` block so the author can apply it with one click
.github/workflows/mattpocock-skills-reviewer.md:208
start_lineis based on how many existing diff lines are being replaced, not how many lines appear in the replacement text. The current wording teaches incorrect range construction and conflicts with the safe-output contract wherelineis the ending line (actions/setup/js/safe_outputs_tools.json:419-435).
- Use a `` ```suggestion `` block (preferred) when the fix is a concrete replacement for the commented lines; set `start_line` when spanning multiple lines
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Medium
| <summary>💡 Suggested fix</summary> | ||
| For each significant issue, call `create-pull-request-review-comment` (safe output) with: | ||
| - `path` — repository-relative file path | ||
| - `line` — line number in the diff (use `start_line` when the replacement spans multiple lines) |
| "path": "path/to/file.ts", | ||
| "line": 42, | ||
| "body": "**[/tdd]** Missing edge case: `value` is `null` — add a test to prevent this regression.\n\n<details>\n<summary>💡 Suggested test</summary>\n\n```ts\nit('returns default when value is null', () => {\n expect(fn(null)).toBe(defaultValue);\n});\n```\n\nMissing edge case tests are a common source of regressions.\n\n</details>\n\n@copilot please address this." | ||
| "body": "**[/tdd]** Missing edge case: `value` is `null` — add a test to prevent this regression.\n\n```suggestion\nit('returns default when value is null', () => {\n expect(fn(null)).toBe(defaultValue);\n});\n```\n\nMissing edge case tests are a common source of regressions.\n\n@copilot please address this." |
|
🎉 This pull request is included in a new release. Release: |
PR reviewer workflows embed code fixes in collapsed
<details>blocks, requiring authors to read and manually apply changes. Switching to GitHub'ssuggestionsyntax makes fixes one-click applicable directly from the review UI.Changes
pr-code-quality-reviewer.md— Step 4 updated: prefer```suggestionblocks for concrete line-level fixes;start_lineguidance added for multi-line spans;<details>retained as fallback for issues requiring broader structural changesmattpocock-skills-reviewer.md— Step 5 updated with the same pattern; two concrete JSON examples (with and without suggestion) replace the single<details>-only exampleExample
Review comment body with a one-click suggestion: