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

Incorrect handling of PR builds from GitHub Actions. #52

Closed
drazisil opened this issue Jan 27, 2020 · 4 comments · Fixed by #53
Closed

Incorrect handling of PR builds from GitHub Actions. #52

drazisil opened this issue Jan 27, 2020 · 4 comments · Fixed by #53
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@drazisil
Copy link
Contributor

Summary from the customer:

I did a bit of looking today. It appears that pull_request events use an automatic merge commit for the pull request, and the GITHUB_SHA is showing that commit hash instead of the one for the commit on the branch that was actually pushed. It makes some sense, but it's a big odd to get your head around. I believe that Travis CI does the same thing, except that they make it easy to know what the underlying commit you're trying to test about is, but GitHub actions does not expose that in an environment variable.

In order to trace it back to the commit we're really trying to identify, we need to look at the parents of the commit we're on. I'm not sure the optimal way to do that, but the commit message of the current commit has it, and of course git itself has record of what the parent commits are as well, though I'm not totally sure the best way to figure out which of the parents is really the one we're looking for.

It seems that GitHub Actions may make a merge commit build for PRs, similar to how Travis CI does. I'm not sure if they commit this SHA, but the Codecov action does not use the correct SHA in this case.

@drazisil drazisil added bug Something isn't working help wanted Extra attention is needed labels Jan 27, 2020
@armano2
Copy link
Contributor

armano2 commented Jan 28, 2020

@drazisil this action is just a wrapper for https://codecov.io/bash and this seems to be similar issues to one from pipelines codecov/codecov-bash#189
pr property is no being set

@drazisil
Copy link
Contributor Author

This one is different in the sense that we aren't sure if Actions has an env for the PR number.

@drazisil
Copy link
Contributor Author

@ibrahim0814 are you able to chime in here?

@armano2
Copy link
Contributor

armano2 commented Jan 29, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants