Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the correct SHA for pull request snapshots (#401)
Evidently, `github.context.sha` is not always what you might consider the "current commit" in a given context. In most GitHub pull request event types, `github.context.sha` will be the "Last merge commit on the GITHUB_REF branch." In those cases, the commit SHA that should be associated with the snapshot is `github.event.pull_request.head.sha`. This commit adds a helper function, `getSha`, which will return the correct SHA for the current context. Signed-off-by: Justin Holguin <juxtin@github.com> Signed-off-by: GitHub <noreply@github.com>
- Loading branch information
Showing
4 changed files
with
106 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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