MCPcopy Create free account
hub / github.com/angular/dev-infra / upstreamUrlToPush

Function upstreamUrlToPush

ng-dev/pr/common/checkout-pr.ts:141–152  ·  view source on GitHub ↗
(repoUrl: string)

Source from the content-addressed store, hash-verified

139}
140
141function 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}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected