feat(review): add --edit-comment flag for updating pending review comments#16
Open
EurFelux wants to merge 3 commits intoagynio:mainfrom
Open
feat(review): add --edit-comment flag for updating pending review comments#16EurFelux wants to merge 3 commits intoagynio:mainfrom
EurFelux wants to merge 3 commits intoagynio:mainfrom
Conversation
This implements the update functionality for the CRUD lifecycle of pending
review comments, allowing users to modify comment bodies before submission.
Usage:
gh pr-review review --edit-comment \
--comment-id PRRC_kwDOAAABbcdEFG12 \
--body "Updated comment text" \
-R owner/repo 42
Features:
- New --edit-comment flag to edit a comment in a pending review
- New --comment-id flag to specify the GraphQL comment node ID (PRRC_...)
- Validates that comment ID uses GraphQL node ID format
- Requires --body for the new comment content
- Returns JSON status output following existing conventions
GraphQL mutation used: updatePullRequestReviewComment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EurFelux
commented
Feb 3, 2026
Contributor
Author
EurFelux
left a comment
There was a problem hiding this comment.
Test: edit-comment feature verified working
|
|
||
| cmd.Flags().BoolVar(&opts.Start, "start", false, "Open a pending review") | ||
| cmd.Flags().BoolVar(&opts.AddComment, "add-comment", false, "Add an inline comment to a pending review") | ||
| cmd.Flags().BoolVar(&opts.EditComment, "edit-comment", false, "Edit a comment in a pending review") |
Contributor
Author
There was a problem hiding this comment.
Updated comment text - edit works!
This implements the update functionality for the CRUD lifecycle of pending review comments, allowing users to modify comment bodies before submission. Features: - New --edit-comment flag to edit a comment in a pending review - New --comment-id flag to specify the GraphQL comment node ID (PRRC_...) - Validates that comment ID uses GraphQL node ID format - Requires --body for the new comment content - Returns JSON status output following existing conventions Bug fix: - Fixed GraphQL mutation parameter name: pullRequestReviewCommentId (not id) Documentation: - Updated SKILL.md with edit-comment command and workflow - Updated README.md quickstart with edit example - Updated Backend policy table - Added review --edit-comment section to docs/USAGE.md Testing: - Manually tested on PR agynio#16: created review, added comment, edited it, verified update, submitted review GraphQL mutation used: updatePullRequestReviewComment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add three test cases for the edit-comment functionality: - TestReviewEditCommentCommand_GraphQLOnly: successful edit with valid inputs - TestReviewEditCommentCommandRequiresGraphQLCommentID: validates PRRC_ prefix required - TestReviewEditCommentCommandRequiresBody: validates --body is required Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v2nic
added a commit
to v2nic/gh-pr-review
that referenced
this pull request
Apr 7, 2026
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
This PR implements the update/edit functionality for the CRUD lifecycle of pending review comments.
Changes
Code
--edit-commentflag to edit a comment in a pending review--comment-idflag to specify the GraphQL comment node ID (PRRC_...)--bodyflag (required) for the new comment contentBug Fix
pullRequestReviewCommentId(notid)Documentation
Tests
TestReviewEditCommentCommand_GraphQLOnly- validates successful edit with GraphQL mutationTestReviewEditCommentCommandRequiresGraphQLCommentID- validates PRRC_ prefix requiredTestReviewEditCommentCommandRequiresBody- validates --body is requiredUsage
Expected output:
{ \"status\": \"Comment updated successfully\" }Manual Testing
✅ Tested on PR #16:
gh pr-review review --startgh pr-review review --add-comment --body \"Original\"gh pr-review review --edit-comment --comment-id PRRC_... --body \"Updated\"Implementation Details
updatePullRequestReviewComment--add-commentand--submitcommands--bodyis required when editing a commentTesting
All tests pass (including new tests):
🤖 Generated with Claude Code