pending-review: Add replace flag, extended-help, dry-run, fix null serialization#16
Merged
Merged
Conversation
…rialization Fix a bug where ReviewComment serialized null for optional line/side fields, causing GitHub to reject with 422. Add skip_serializing_if. The create operation now checks for existing pending service-gator reviews (identified by marker token) and errors if one exists, telling the caller to set replace=true. This makes the destructive action explicit. With replace=true, all existing pending marker-bearing reviews are deleted before creating the new one. Add extended-help operation documenting the tool interface, comment conventions from perform-forge-review, and the marker token mechanism. Add dry_run flag on the create operation for input validation without submission. Tested end-to-end against the GitHub API: extended-help, dry_run, create with inline comments, create-without-replace error, create-with-replace, and delete all pass. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
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
ReviewCommentserializingnullfor optionalline/sidefields, which GitHub rejects with 422. Addskip_serializing_if.createoperation now checks for existing pending service-gator reviews and errors if one exists, directing the caller to setreplace=true. Withreplace=true, existing pending reviews are deleted before creating the new one.extended-helpoperation documenting the tool interface and usage.dry_runflag on create for input validation without submission.Tested end-to-end against the GitHub API (cgwalters/playground PR #66): extended-help, dry_run, create with inline comments, create-without-replace error, create-with-replace, and delete all pass.