Skip to content

Support for issue_comment event (PR comment) #31

@adamamer20

Description

@adamamer20

Hi!

I'm currently using presubmit/ai-reviewer for automated reviews on pull requests from first-time contributors. These PRs typically originate from forks, so the appropriate GitHub event to safely run workflows with necessary permissions is pull_request_target rather than pull_request.

However, when triggered with the pull_request_target event, the ai-reviewer action throws an unsupported event warning and skips execution:

Warning: Skipped: unsupported github event

Here's the relevant debug log:

##[debug]Starting: Run AI Reviewer
Run presubmit/ai-reviewer@latest
  with:
  env:
    GITHUB_TOKEN: ***
    LLM_API_KEY: ***
    LLM_MODEL: claude-3-7-sonnet-20250219
Warning: Skipped: unsupported github event
##[debug]Node Action run completed with exit code 0

Could you add support for handling the pull_request_target event? This would likely require minimal changes, as the payload is similar to pull_request, and it would significantly help projects relying on forks.

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions