Add support for pull_request_review trigger event#96
Merged
wechuli merged 1 commit intowechuli:mainfrom Dec 31, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for the pull_request_review trigger event to enable proper commit SHA resolution and check status fetching when the GitHub Action is triggered by pull request reviews.
- Added
pull_request_reviewto the list of valid pull request events
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
I noticed that this GH Action, when triggered via
pull_request_reviewevent:allcheckspassed/src/checks/checks.ts
Lines 112 to 118 in 105c017
This is caused by invalid resolution of the PR's HEAD commit SHA, which in turn is needed to fetch check statuses from GitHub API.
Changes
Add
pull_request_reviewtovalidPullRequestEventsso that the GH Action can resolve thecommitSHAproperly.Note that
pull_request?.head.shais defined forpull_request_reviewevent the same as it is forpull_requestandpull_request_targetevents: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=submitted#pull_request_review