-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: better detect merge-commits (#397)
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
- Loading branch information
1 parent
92d7e89
commit ff1c300
Showing
3 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters