-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix branch conflation (PR from fork's main to upstream's main shouldn't overwrite coverage) #661
Comments
Dana, assigning this to you as you will likely be fixing this as part of the wider tokenless changes. |
this depends on #733 |
After making the CLI aware of PRs made from forks, we'll be amending the branch that's sent to the API to follow a specific format that can represent a PR made in forks. Since colons are prohibited in branch names, we'll follow how github/gitlab displays branch names in their UI in PRs made fro a fork repo to the upstream one. branches are displayed as fork-slug:branch-name. |
Change for the CLI is done, but we still need to fix it in the uploader and I don't have enough time to do that, so I'll list below the process we did for the CLI and we should do the same in the uploader One thing we need to check before releasing this:
|
this is still in progress on the API side, reopening and passing to gio |
no hooky it's not done |
I believe this is fixed by codecov/worker#217 |
when we upload a report for CI in a PR, we associate the report with the destination repo but we take the branch name from the source repo. so if i make a PR from my
fork
's main branch to an upstream repo'smain
branch, we upload the coverage report for the upstream repo's main branch and update the coverage with junk from my un-merged PR. this definitely happens for GitHub, didn't check other providersthe fix needs to be written for both
codecov-cli
anduploader
. you can see relevant areas of the code in the following PRs:however, a different approach is favored over the one in those PRs: fetch PR information from the git provider API to determine if the PR is from a fork. if so, name the branch "fork-slug:branch". otherwise just name it "branch"
in addition to making the fix for GitHub, check if it's necessary for the other providers and fix if so. this isn't the only issue in codecov's conceptual model of git, but it's probably the most visible and disruptive one.
The text was updated successfully, but these errors were encountered: