Skip to content

pull_request_review.submitted Triggered Incorrectly on Comment Replies #540

Open
@praveen-tz

Description

@praveen-tz

Describe the bug

When performing Agentic AI code reviews using GitHub MCP Server, our workflow for creating and submitting reviews involves these steps:

  1. Create a pending review: mcp__github__create_pending_pull_request_review
  2. Add review comments: mcp__github__add_pull_request_review_comment_to_pending_review
  3. Submit the pending review: mcp__github__submit_pending_pull_request_review

The process works as expected in terms of review creation, comments, and their visibility on GitHub.
However, when a developer replies to a review comment (e.g., responds "done" or "clarification write up"), our GitHub Actions workflow, which listens for the pull_request_review.submitted event, is triggered.
This trigger should only fire when an actual review is submitted with one of the eligible states: "approved", "changes_requested", or "commented".
Instead, it is firing on mere replies to existing comments, with github.event.review.state == 'commented'.

To double-check, I performed a manual review via the Chrome browser and replied to review comments the usual way. The workflow was not triggered in this scenario—so this issue appears specific to reviews processed by the MCP server.

Affected version

GitHub MCP Server
Version: v0.4.0
Commit: e9f748f246761fb0769e2a5611003939a6274872
Build Date: 2025-05-23T13:06:59Z

Steps to reproduce the behavior

  1. Use MCP Server to create a pending review, add comments, and submit the review.
  2. Have a developer reply to one of the posted review comments (e.g., with "done" or similar).
  3. Observe that the pull_request_review.submitted event is triggered with github.event.review.state == 'commented', even though this should only happen on review submission—not comment replies.

Expected vs actual behavior

Expected:
The pull_request_review.submitted event should only be triggered when a review is actually submitted with states like "approved", "changes_requested", or "commented".

Actual:
The event is also being triggered when someone replies to an existing review comment created via MCP server, even though this should not count as a new review submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions