mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-07 19:47:25 +00:00
Use an existing token even if the PR is from a fork (#1471)
Use a given token even if the PR is from a fork
This commit is contained in:
parent
81c0a51dcc
commit
7594baaf0c
1 changed files with 2 additions and 2 deletions
|
|
@ -46,12 +46,12 @@ const isPullRequestFromFork = (): boolean => {
|
|||
};
|
||||
|
||||
const getToken = async (): Promise<string> => {
|
||||
if (isPullRequestFromFork()) {
|
||||
let token = core.getInput('token');
|
||||
if (!token && isPullRequestFromFork()) {
|
||||
core.info('==> Fork detected, tokenless uploading used');
|
||||
process.env['TOKENLESS'] = context.payload.pull_request.head.label;
|
||||
return Promise.resolve('');
|
||||
}
|
||||
let token = core.getInput('token');
|
||||
let url = core.getInput('url');
|
||||
const useOIDC = isTrue(core.getInput('use_oidc'));
|
||||
if (useOIDC) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue