Bug
/verified by <name> (and other /verified subcommands) are silently ignored when posted as part of a Pull Request Review (i.e. when submitting a review with a body), but work correctly when posted as a regular issue comment.
Reproducer
- On a PR, click Review changes, type
/verified by ci in the review body, and submit.
- The
/verified label is not applied.
- Post
/verified by ci as a regular PR comment.
- The label is applied.
Real-world example:
Root Cause
The plugin only registers handlers for IssueCommentEvent and PullRequestEvent in main.go:
eventServer.RegisterHandleIssueCommentEvent(serv.handleIssueComments)
eventServer.RegisterHandlePullRequestEvent(serv.handlePullRequest)
There is no handler registered for PullRequestReviewEvent, even though the githubeventserver framework fully supports it via RegisterReviewEventHandler.
When GitHub receives a PR review submission, it sends a pull_request_review webhook — not an issue_comment webhook. Since the plugin has no handler for that event type, the review body is never parsed for /verified commands.
Other Prow-native commands like /lgtm and /approve work from review bodies because those plugins have their own ReviewEvent handlers.
Proposed Fix
Add a handleReviewEvent method to server.go that extracts the review body, splits it into lines, and processes /verified commands the same way digestComment/digestLine already do for issue comments. Then register it in main.go:
eventServer.RegisterReviewEventHandler(serv.handleReviewEvent)
/cc @damdo
Bug
/verified by <name>(and other/verifiedsubcommands) are silently ignored when posted as part of a Pull Request Review (i.e. when submitting a review with a body), but work correctly when posted as a regular issue comment.Reproducer
/verified by ciin the review body, and submit./verifiedlabel is not applied./verified by cias a regular PR comment.Real-world example:
Root Cause
The plugin only registers handlers for
IssueCommentEventandPullRequestEventinmain.go:There is no handler registered for
PullRequestReviewEvent, even though thegithubeventserverframework fully supports it viaRegisterReviewEventHandler.When GitHub receives a PR review submission, it sends a
pull_request_reviewwebhook — not anissue_commentwebhook. Since the plugin has no handler for that event type, the review body is never parsed for/verifiedcommands.Other Prow-native commands like
/lgtmand/approvework from review bodies because those plugins have their ownReviewEventhandlers.Proposed Fix
Add a
handleReviewEventmethod toserver.gothat extracts the review body, splits it into lines, and processes/verifiedcommands the same waydigestComment/digestLinealready do for issue comments. Then register it inmain.go:/cc @damdo