codecov / browser-extension

Codecov Browser Extension
http://codecov.io
Apache License 2.0
214 stars 60 forks source link

Merge commits break coverage #5

Open RyanCopley opened 9 years ago

RyanCopley commented 9 years ago

https://github.com/BlockSync/BlockSync/blob/master/BlockSync/BSBlockSync.m should report 100% coverage, however, since it was via a pull request, it is ajaxing this URL:

https://codecov.io/github/BlockSync/BlockSync?ref=e412148b98fd0f4831737a4a82ffae9fbfcff71e

If you look at the history, e41214 was a merge commit and was not covered: https://github.com/BlockSync/BlockSync/commit/e412148b98fd0f4831737a4a82ffae9fbfcff71e

The proper commit would have been https://github.com/BlockSync/BlockSync/commit/bc833037918647479959a124bbab17c99a679acc

So, you may have to "back track" through the commit history to gather coverage data :/ which is odd, because that could cause issues.

tl;dr: latest commit for a file does not mean that was the commit that was covered

RyanCopley commented 9 years ago

Interesting enough, when I click Build Pushes on Travis, it works

stevepeak commented 9 years ago

When using the browser extensions it will get the page ref in the dom. I'm not sure what to do here...because if the projected has changed and that ref is not covered then I cannot overlay coverage.

bgerstle commented 8 years ago

Also seeing this issue: our pull requests don't display any coverage because the extension is GET-ing the last commit on the branch (and receiving a 404) instead of the merge commit (as reported by the PR comment). Would it be possible to use the PR number (e.g. from window.location.href) to retrieve the latest report from codecov?


Using Chrome extension version 0.5.8