Merge pull request #54 from connorads/fix-for-pr-review-event

Add support for for pull_request_review
This commit is contained in:
Aaron Klaassen 2023-02-27 10:14:24 -05:00 committed by GitHub
commit a9bf050e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -6,7 +6,7 @@ A GitHub action to comment on the relevant open PR when a commit is pushed.
- Requires the `GITHUB_TOKEN` secret.
- Requires the comment's message in the `msg` parameter.
- Supports `push` and `pull_request` event types.
- Supports `push`, `pull_request` and `pull_request_review` event types.
### Sample workflow

View file

@ -27,6 +27,8 @@ repo = event["repository"]["full_name"]
if ENV.fetch("GITHUB_EVENT_NAME") == "pull_request"
pr_number = event["number"]
elsif ENV.fetch("GITHUB_EVENT_NAME") == "pull_request_review"
pr_number = event["pull_request"]["number"]
else
pulls = github.pull_requests(repo, state: "open")