Skip to content

pull_request_review_comment event causes prepare step to crash with "undefined is not an object (evaluating 'context.payload.comment.body')" #17

@leoarry

Description

@leoarry

Describe the bug
When the workflow is triggered by a pull_request_review_comment event, the prepare step crashes with:

undefined is not an object (evaluating 'context.payload.comment.body')

The action attempts to read the comment body to check for the trigger phrase (@claude), but context.payload.comment appears to be undefined for this event type on Gitea, causing an unhandled error that aborts the entire job.

To Reproduce

  1. Configure the workflow to trigger on pull_request_review_comment
  2. Open a pull request and add an inline review comment containing @claude
  3. Observe the Actions run triggered by the event
  4. See the prepare step fail with undefined is not an object (evaluating 'context.payload.comment.body')

Expected behavior
The action should either handle the pull_request_review_comment event correctly by reading the comment body from the appropriate payload field, or fail gracefully (e.g. skip with no trigger found) rather than throwing an unhandled exception.

Screenshots
N/A

Workflow yml file
N/A

API Provider

  • Anthropic First-Party API (default)
  • AWS Bedrock
  • GCP Vertex

Additional context
This was reproduced on a self-hosted Gitea instance using markwylde/claude-code-gitea-action@v1.0.20. Gitea's pull_request_review_comment event payload may differ from GitHub's — the comment body may be nested under a different key (e.g. context.payload.review.body) rather than context.payload.comment.body.

Workaround: use issue_comment as the trigger event instead, and post @claude in a regular PR comment rather than an inline review comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions