mirror of
https://github.com/unsplash/comment-on-pr.git
synced 2025-02-22 21:24:20 +08:00
Merge pull request #54 from connorads/fix-for-pr-review-event
Add support for for pull_request_review
This commit is contained in:
commit
a9bf050e74
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue