-
Notifications
You must be signed in to change notification settings - Fork 42
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
Correct SHA may not being chosen when used in a pre-merge commit #372
Labels
bug
Something isn't working
Comments
The Uploader uses the following logic to detect the correct SHA in a pre-merge commit: |
giovanni-guidini
added a commit
that referenced
this issue
Mar 5, 2024
Apparently a common thing for CIs to do is create a merge-commit for changes in a branch before running tests and stuff. This means that - especially for not-directly-supported CIs - we would maybe return a SHA for a commit that didn't exist in the branch. These changes fix that by checking to see if the current commit is a merge commit. If it is we return the second parent, the most recent commit before the current one. Q: What if the current latest commit in the branch is a merge commit? Well in this case the parent, which is also part of the branch, will have the coverage. Users can still provide a commit sha value to override this behavior. closes #372
giovanni-guidini
added a commit
that referenced
this issue
Mar 6, 2024
Apparently a common thing for CIs to do is create a merge-commit for changes in a branch before running tests and stuff. This means that - especially for not-directly-supported CIs - we would maybe return a SHA for a commit that didn't exist in the branch. These changes fix that by checking to see if the current commit is a merge commit. If it is we return the second parent, the most recent commit before the current one. Q: What if the current latest commit in the branch is a merge commit? Well in this case the parent, which is also part of the branch, will have the coverage. Users can still provide a commit sha value to override this behavior. closes #372
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: My notifications are not working when using the CLI.
In the case that the incorrect SHA is picked, Codecov will show the commit message as
merge <SHA>
Workaround: You can manually pass the correct SHA to the CLI with the
--sha
flag.If you are using the CircleCI orb, or the GitHub action, please see that wrappers's docs for the method to manually pass the SHA.
We are aware of this issue.
The text was updated successfully, but these errors were encountered: