(repoUrl: string)
| 139 | } |
| 140 | |
| 141 | function upstreamUrlToPush(repoUrl: string): string { |
| 142 | const pushToUpstreamUrl = new URL(repoUrl); |
| 143 | if (process.env['GITHUB_TOKEN']) { |
| 144 | pushToUpstreamUrl.password = '$GITHUB_TOKEN'; |
| 145 | pushToUpstreamUrl.username = 'x-access-token'; |
| 146 | } else if (process.env['TOKEN']) { |
| 147 | pushToUpstreamUrl.password = '$TOKEN'; |
| 148 | pushToUpstreamUrl.username = 'x-access-token'; |
| 149 | } |
| 150 | |
| 151 | return pushToUpstreamUrl.href; |
| 152 | } |
no outgoing calls
no test coverage detected