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

sourceVersion is incorrect when running action on Pull Request #36

Closed
pcarney8 opened this issue Apr 21, 2020 · 2 comments · Fixed by #40
Closed

sourceVersion is incorrect when running action on Pull Request #36

pcarney8 opened this issue Apr 21, 2020 · 2 comments · Fixed by #40

Comments

@pcarney8
Copy link

During execution a GitHub Pull Request runs as a detached head, causing the GITHUB_SHA version to not match the latest commit.

This value is then passed to CodeBuild and shows up as the "Resolved Source Version" when the correct value is in github.event.pull_request.head.sha

const sourceVersion = process.env[`GITHUB_SHA`];

Trying to override GITHUB_SHA in the Run does not work. Could an override be added? Similar to the others?

@seebees
Copy link
Collaborator

seebees commented May 2, 2020

I would like this to just work.
Rather than update this as an option,
I would rather just identify the condition and send this other value.

Some links:
https://github.community/t5/GitHub-Actions/GITHUB-SHA-but-how-to-get-the-latest-commit-reference-on-a/td-p/40873
https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request

As a followup question,
how are you injecting your AWS creds to Pull Requests?

@andres-lowrie
Copy link

andres-lowrie commented Jun 15, 2020

so is there a release cycle cadence or something to subscribe to? (in regards to #40 getting merged in to master)

trying to get a sense of the project is all 😊

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

Successfully merging a pull request may close this issue.

3 participants