Skip to content

What is the difference between these two ways to get the triggering commit? #25318

Answered by Yanjingzhu
roddds asked this question in Actions
Discussion options

You must be logged in to vote

The GITHUB_SHA of pull_request event is the Last merge commit on the GITHUB_REF branch . The GITHUB_REF is PR merge branch refs/pull/:prNumber/merge .

Pull request head points to the source branch of the pull request.
github.event.pull_request.head.sha is the right way to get SHA of the most recent commit before the pull request was closed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants