diff --git a/README.md b/README.md index 11934f2..4075379 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A GitHub action that will comment on the relevant open PR with a file contents w - Requires the `GITHUB_TOKEN` secret. - Requires the comment's artifact in the `msg` parameter. -- Supports `push` and `pull_request` event types. +- Supports `push`, `pull_request` and `pull_request_target` event types. ### Sample workflow diff --git a/entrypoint.sh b/entrypoint.sh index eadd404..cd1bcc3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,7 +20,7 @@ end repo = event["repository"]["full_name"] -if ENV.fetch("GITHUB_EVENT_NAME") == "pull_request" +if ["pull_request", "pull_request_target"].include? ENV.fetch("GITHUB_EVENT_NAME") pr_number = event["number"] else pulls = github.pull_requests(repo, state: "open")