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

Clarify setting HEAD SHA for GH Actions #763

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Conversation

StephenBarlow
Copy link
Contributor

No description provided.

@StephenBarlow
Copy link
Contributor Author

@EverlastingBugstopper This stems from a support ticket where a user had an issue with checking against the GH merge commit instead of HEAD. I didn't encounter this same issue in my own project, but setting the SHA like this doesn't seem to hurt anything either! Thoughts?


<img class="screenshot" src="./assets/checks-result.jpg" width="550"/>

For these entries to display correctly, you need to make sure Rover executes against the pull request's `HEAD` commit, as opposed to the _merge_ commit that GitHub adds. To guarantee this, set the `APOLLO_VCS_COMMIT` environment variable in your action's configuration, like so:
Copy link
Contributor

Choose a reason for hiding this comment

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

"executes against" isn't exactly correct. you could say "make sure Rover reports the pull request's HEAD commit to Studio so that the check matches the commit expected by the Apollo Studio GitHub App". or something

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh thanks, made an uneducated guess there 😄

@abernix
Copy link
Member

abernix commented Aug 26, 2021

Hmm, this almost seems like something we should just detect and do automatically. Is that too magic though?

Docs are a great solution without such implementation done in the near-term though.

@EverlastingBugstopper
Copy link
Contributor

Yes this has come up before - I think docs are a good solution here.

Last time this came up I believe it was determined that it wasn't super possible to tell when was the right time to do this, but this comment on this thread is kinda illuminating on why GH Actions does this by default.

@StephenBarlow StephenBarlow merged commit 7e96f0f into main Aug 26, 2021
@StephenBarlow StephenBarlow deleted the sb/gh-actions-checks branch August 26, 2021 19:14
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 this pull request may close these issues.

4 participants