code-review: Use inline review comments with suggested changes#424
Closed
projectdelta6 wants to merge 1 commit intoanthropics:mainfrom
Closed
code-review: Use inline review comments with suggested changes#424projectdelta6 wants to merge 1 commit intoanthropics:mainfrom
projectdelta6 wants to merge 1 commit intoanthropics:mainfrom
Conversation
Instead of posting a single regular PR comment, use the GitHub Reviews API to post inline comments with ```suggestion blocks on the exact lines of code. This gives PR authors an "Apply suggestion" button in the GitHub UI to directly commit fixes. Changes: - Add Bash(gh api:*) to allowed-tools for Reviews API access - Update step 8 to use gh api for inline review comments - Add documentation for the Reviews API call format - Update output format to reference inline comments Closes anthropics#423 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
code-reviewskill to post inline review comments with GitHub'ssuggestionsyntax instead of regular PR commentsChanges
Bash(gh api:*)toallowed-toolsto enable the GitHub Reviews APIgh api repos/{owner}/{repo}/pulls/{number}/reviewswith acommentsarray for inline commentsMotivation
Currently the skill posts a single regular comment on the PR with links to the relevant code. The reviewer has to manually navigate to each file and make changes themselves. With inline review comments using
suggestionblocks, each issue appears directly on the relevant lines of code with a one-click "Apply suggestion" button.Closes #423
Test plan
/code-reviewon a PR with known issues and verify inline comments appear on the correct lines🤖 Generated with Claude Code