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

Function addTokenToGitHttpsUrl

ng-dev/utils/git/github-urls.ts:21–26  ·  view source on GitHub ↗
(githubHttpsUrl: string, token: string)

Source from the content-addressed store, hash-verified

19
20/** Adds the provided token to the given Github HTTPs remote url. */
21export function addTokenToGitHttpsUrl(githubHttpsUrl: string, token: string) {
22 const url = new URL(githubHttpsUrl);
23 url.password = token;
24 url.username = 'x-access-token';
25 return url.href;
26}
27
28/** Gets the repository Git URL for the given github config. */
29export function getRepositoryGitUrl(

Callers 5

getRepositoryGitUrlFunction · 0.85
publishSnapshotsMethod · 0.85
rebasePrFunction · 0.85
checkoutToTargetBranchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected