Skip to content

/verified command not picked up from PR review comments #176

@damdo

Description

@damdo

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

  1. On a PR, click Review changes, type /verified by ci in the review body, and submit.
  2. The /verified label is not applied.
  3. Post /verified by ci as a regular PR comment.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions