Repository navigation
Require PR review completion comments in github-pr-review skill #222
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 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
Some comments aren't visible on the classic Files Changed page.
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -51,6 +51,21 @@ EOF | |||||
| gh api -X POST repos/{owner}/{repo}/pulls/{pr_number}/reviews --input /tmp/review.json | ||||||
| ``` | ||||||
|
|
||||||
| ### Step 3: Confirm completion with a PR issue comment | ||||||
|
|
||||||
| After the review API call succeeds, always post a short issue comment on the PR conversation confirming that the review was completed. Pull requests are also issues in the GitHub API, so use the issues comments endpoint. | ||||||
|
|
||||||
| ```bash | ||||||
| gh api -X POST repos/{owner}/{repo}/issues/{pr_number}/comments \ | ||||||
| -f body='Completed OpenHands review: submitted a {COMMENT|APPROVE|REQUEST_CHANGES} review on commit {commit_sha}.' | ||||||
| ``` | ||||||
|
neubig marked this conversation as resolved.
|
||||||
|
|
||||||
| **Mandatory:** Do not finish without both: | ||||||
| 1. creating the PR review object, and | ||||||
| 2. posting the completion comment on the PR issue. | ||||||
|
|
||||||
| If either API call fails, treat the review as incomplete and continue until it succeeds or surface the failure clearly instead of silently succeeding. | ||||||
|
neubig marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| ### Parameters | ||||||
|
|
||||||
| | Parameter | Description | | ||||||
|
|
@@ -141,8 +156,10 @@ curl -X POST \ | |||||
| 1. Analyze the code and identify important issues (minimize nits) | ||||||
| 2. Write review data to a JSON file (e.g., `/tmp/review.json`) | ||||||
| 3. Post **ONE** review using `gh api --input /tmp/review.json` | ||||||
| 4. Use priority labels (🔴🟠🟡) on every comment | ||||||
| 5. Do NOT post comments for code that is acceptable — only comment when action is needed | ||||||
| 6. Use suggestion syntax for concrete code changes | ||||||
| 7. Keep the review body brief (details go in inline comments) | ||||||
| 8. If no issues: post a short approval message with no inline comments | ||||||
| 4. Post a short PR issue comment confirming the review was completed | ||||||
| 5. Use priority labels (🔴🟠🟡) on every comment | ||||||
| 6. Do NOT post comments for code that is acceptable — only comment when action is needed | ||||||
| 7. Use suggestion syntax for concrete code changes | ||||||
| 8. Keep the review body brief (details go in inline comments) | ||||||
| 9. If no issues: post a short approval message with no inline comments | ||||||
| 10. Do not finish unless both the review object and completion comment were created successfully | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Style: File should end with a newline character (POSIX standard).
Suggested change
|
||||||
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.