-
Notifications
You must be signed in to change notification settings - Fork 724
Add skill for addressing comments #8599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+94
−4
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| name: address-pr-comments | ||
| description: "Address review comments (including Copilot comments) on the active pull request. Use when: responding to PR feedback, fixing review comments, resolving PR threads, implementing requested changes from reviewers, addressing code review, fixing PR issues." | ||
| argument-hint: "Optionally specify a reviewer name or file to focus on" | ||
| --- | ||
|
|
||
| # Address PR Review Comments | ||
|
|
||
| Read the active pull request, identify unresolved review comments and feedback, implement the requested changes, and resolve the threads. | ||
|
|
||
| ## When to Use | ||
|
|
||
| - A reviewer has left comments or change requests on the active PR | ||
| - You need to systematically work through all open review threads | ||
| - You want to respond to or implement reviewer feedback | ||
|
|
||
| ## Procedure | ||
|
|
||
| ### 1. Read the Active PR | ||
|
|
||
| Call the `github-pull-request_activePullRequest` tool. | ||
|
|
||
| **Refresh logic**: Check whether a refresh is needed before reading: | ||
| - Call the tool once *without* `refresh` to get the cached state | ||
| - Inspect the `lastUpdatedAt` field in the result | ||
| - If the timestamp is **less than 3 minutes ago**, the PR is actively changing - call the tool again with `refresh: true` to ensure you have the latest comments and state | ||
| - If the timestamp is older than 3 minutes, proceed with the cached data | ||
|
|
||
| ### 2. Identify Unresolved Comments | ||
|
|
||
| From the tool result, collect all feedback that needs action: | ||
|
|
||
| - **`comments`** array: inline review thread comments where `commentState` is `"unresolved"` | ||
| - **`timelineComments`** array: general PR comments and reviews where `commentType` is `"CHANGES_REQUESTED"` or `"COMMENTED"` | ||
|
|
||
| Group related comments by file (`file` field) to handle them efficiently. | ||
|
|
||
| ### 3. Plan Changes | ||
|
|
||
| Before modifying any files: | ||
| 1. Read each unresolved comment carefully | ||
| 2. Identify the file and location each comment refers to | ||
| 3. Determine the minimal correct fix for each, if a fix is needed (not all comments are worthy of a change) | ||
| 4. Note dependencies between comments (e.g., a rename that affects multiple files) | ||
|
|
||
| ### 4. Implement Changes | ||
|
|
||
| Work through the grouped comments file by file: | ||
| - Read the relevant file section before editing | ||
| - Apply the requested change | ||
| - Do not refactor or modify code outside the scope of each comment | ||
| - If a comment is unclear or contradictory, note it for a follow-up reply rather than guessing | ||
|
|
||
| ### 5. Verify | ||
|
|
||
| After all changes are made: | ||
| - Review that each originally unresolved comment has a corresponding code change or a note about why no code change was needed. | ||
| - Ensure no unrelated code was modified | ||
|
|
||
| ### 6. Summarize | ||
|
|
||
| Provide a concise summary of: | ||
| - Which comments were addressed and what changes were made | ||
| - Any comments that were intentionally skipped (with reasoning) | ||
| - Any follow-up questions for the reviewer | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.