Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SHA on pull request #31

Merged
merged 6 commits into from
Dec 11, 2020
Merged

Use SHA on pull request #31

merged 6 commits into from
Dec 11, 2020

Conversation

gcooney
Copy link
Contributor

@gcooney gcooney commented Dec 11, 2020

Fixes a bug with how we retrieve the commit SHA for pull_request triggered builds. GITHUB_SHA refers to the head of the branch github creates to represent the PR, not the head of the branch itself for this action type.

Fixes #29

pull_request event spec: https://developer.github.com/webhooks/event-payloads/#pull_request
GITHUB_SHA value for pull_request event trigger: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull_request

Copy link

@kxtran kxtran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@DonAtMabl DonAtMabl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that is a bit tricky. Maybe add a link to the docs in a comment or in the PR? LGTM.

@gcooney gcooney merged commit 0b85570 into master Dec 11, 2020
@gcooney gcooney deleted the sha-on-pull-request branch December 11, 2020 18:52
@twistedpair twistedpair changed the title Sha on pull request Use SHA on pull request Dec 12, 2020
@twistedpair
Copy link
Contributor

@gcooney , looks like this still needs releasing, and the v1 tag needs to be updated as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Action doesn't seem to get the right revision value
4 participants