You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodecovCLI would detect if the PR is happening from a fork to an upstream repo. In the case of public repos, CLI can make an API request without authentication, so no tokens needed. The CLI already has the PR number via _get_pull_request_number method in each CI adapter, we can use it to make a request to https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request (upstream repo slug available via GITHUB_REPOSITORY env var). If the head.repo.full_name is different than GITHUB_REPOSITORY or base.repo.full_name then we can assume it's a pull from a fork. So this step works for public GitHub repos, another investigation is needed for private repos for the ability to get an auth token to be used within a fork PR. Similar API requests can be made for other providers. Also note that this step can help in fixing the branch conflation issue #661 (comment)
The text was updated successfully, but these errors were encountered:
CodecovCLI would detect if the PR is happening from a fork to an upstream repo. In the case of public repos, CLI can make an API request without authentication, so no tokens needed. The CLI already has the PR number via
_get_pull_request_number
method in each CI adapter, we can use it to make a request to https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request (upstream repo slug available via GITHUB_REPOSITORY env var). If the head.repo.full_name is different than GITHUB_REPOSITORY or base.repo.full_name then we can assume it's a pull from a fork. So this step works for public GitHub repos, another investigation is needed for private repos for the ability to get an auth token to be used within a fork PR. Similar API requests can be made for other providers. Also note that this step can help in fixing the branch conflation issue #661 (comment)The text was updated successfully, but these errors were encountered: