Skip to content

Commit

Permalink
Don't assume protocol is HTTPS
Browse files Browse the repository at this point in the history
While I believe this would work with github enterprise it breaks selfhosted runners like act and gitea/forjego actions.
  • Loading branch information
traverseda authored Oct 19, 2024
1 parent ababa3d commit 7f0cd66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/set-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ This operation is prohibited to protect your contents
}
}

return `https://x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`;
return `${getServerUrl().host}//x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`;
}

export function setPersonalToken(personalToken: string, publishRepo: string): string {
core.info('[INFO] setup personal access token');
return `https://x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`;
return `${getServerUrl().host}//x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`;
}

export function getPublishRepo(externalRepository: string, owner: string, repo: string): string {
Expand Down

0 comments on commit 7f0cd66

Please sign in to comment.