feat: support dismissing PR-level reviews in resolve_comment#169
Merged
ichoosetoaccept merged 1 commit intomainfrom Feb 17, 2026
Merged
Conversation
Member
Author
This was referenced Feb 17, 2026
Greptile SummaryExtends
Confidence Score: 4/5
Important Files Changed
Flowchartflowchart TD
Start([resolve_comment called]) --> CheckIC{thread_id starts<br/>with IC_?}
CheckIC -->|Yes| RejectIC[Raise GhError:<br/>Cannot resolve bot comments]
CheckIC -->|No| CheckPRR{thread_id starts<br/>with PRR_?}
CheckPRR -->|Yes| DismissReview[Call _dismiss_pr_review]
DismissReview --> GraphQLDismiss[Execute dismissPullRequestReview<br/>GraphQL mutation]
GraphQLDismiss --> CheckGraphQLErr{GraphQL errors?}
CheckGraphQLErr -->|Yes| RaiseGraphQLErr[Raise GhError]
CheckGraphQLErr -->|No| CheckDismissState{state == DISMISSED?}
CheckDismissState -->|Yes| ReturnDismissSuccess[Return success message]
CheckDismissState -->|No| RaiseDismissFail[Raise GhError:<br/>Failed to dismiss]
CheckPRR -->|No, PRRT_| FetchThread[Fetch thread details]
FetchThread --> CheckPolicy{Check resolve_levels<br/>policy & reply requirement}
CheckPolicy -->|Blocked| RaisePolicy[Raise GhError:<br/>Policy violation]
CheckPolicy -->|Allowed| ResolveThread[Execute resolveReviewThread<br/>GraphQL mutation]
ResolveThread --> CheckResolveErr{GraphQL errors?}
CheckResolveErr -->|Yes| RaiseResolveErr[Raise GhError]
CheckResolveErr -->|No| CheckResolveState{isResolved == true?}
CheckResolveState -->|Yes| ReturnResolveSuccess[Return success message]
CheckResolveState -->|No| RaiseResolveFail[Raise GhError:<br/>Failed to resolve]
Last reviewed commit: 19167eb |
95cfa5a to
a877d2f
Compare
400193b to
198ba04
Compare
Member
Author
|
@greptileai review |
Member
Author
Merge activity
|
198ba04 to
19167eb
Compare
| } | ||
| mocker.patch("codereviewbuddy.tools.comments.gh.graphql", return_value=response) | ||
| with pytest.raises(GhError, match="Failed to dismiss"): | ||
| resolve_comment(42, "PRR_kwDOtest123") |
There was a problem hiding this comment.
consider adding test for GraphQL errors in PRR dismiss flow (similar to test_inline_thread_graphql_error_raises on line 1138)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_comments.py
Line: 1131:1131
Comment:
consider adding test for GraphQL errors in PRR dismiss flow (similar to `test_inline_thread_graphql_error_raises` on line 1138)
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.
ichoosetoaccept
added a commit
that referenced
this pull request
Feb 17, 2026
Add a test verifying that GraphQL errors during the `dismissPullRequestReview` mutation (PRR_ dismiss flow) correctly raise `GhError`. Mirrors the existing `test_inline_thread_graphql_error_raises` pattern. Suggested by Greptile during review of PR #169.
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.

Extend
resolve_commentto support dismissing PR-level reviews (PRR_IDs) via thedismissPullRequestReviewGraphQL mutation, instead of rejecting them with an error.Changes
_DISMISS_REVIEW_MUTATIONGraphQL mutation and_dismiss_pr_reviewhelperresolve_commentnow routesPRR_IDs to dismiss,PRRT_IDs to resolve, and rejectsIC_IDs with a clear errorserver.pyto reflect PRR_ supportFixes #120