Skip to content

fix(ng-dev): use x-access-token as username for git url #756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/local-actions/changelog/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -66941,7 +66941,7 @@ var GITHUB_TOKEN_GENERATE_URL = "https://github.com/settings/tokens/new";
function addTokenToGitHttpsUrl(githubHttpsUrl, token) {
const url = new URL2(githubHttpsUrl);
url.password = token;
url.username = "_";
url.username = "x-access-token";
return url.href;
}
function getRepositoryGitUrl(config2, githubToken) {
Expand Down
2 changes: 1 addition & 1 deletion github-actions/slash-commands/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69256,7 +69256,7 @@ var GITHUB_TOKEN_GENERATE_URL = "https://github.com/settings/tokens/new";
function addTokenToGitHttpsUrl(githubHttpsUrl, token) {
const url = new URL2(githubHttpsUrl);
url.password = token;
url.username = "_";
url.username = "x-access-token";
return url.href;
}
function getRepositoryGitUrl(config, githubToken) {
Expand Down
2 changes: 1 addition & 1 deletion ng-dev/utils/git/github-urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const GITHUB_TOKEN_GENERATE_URL = 'https://github.com/settings/tokens/new
export function addTokenToGitHttpsUrl(githubHttpsUrl: string, token: string) {
const url = new URL(githubHttpsUrl);
url.password = token;
url.username = '_';
url.username = 'x-access-token';
return url.href;
}

Expand Down
4 changes: 2 additions & 2 deletions ng-dev/utils/testing/virtual-git-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export function getBranchPushMatcher(options: BranchPushMatchParameters) {
const {targetRepo, targetBranch, baseBranch, baseRepo, expectedCommits} = options;
return jasmine.objectContaining({
remote: {
repoUrl: `https://_:abc123@github.com/${targetRepo.owner}/${targetRepo.name}.git`,
repoUrl: `https://x-access-token:abc123@github.com/${targetRepo.owner}/${targetRepo.name}.git`,
name: `refs/heads/${targetBranch}`,
},
head: jasmine.objectContaining({
newCommits: expectedCommits,
ref: {
repoUrl: `https://_:abc123@github.com/${baseRepo.owner}/${baseRepo.name}.git`,
repoUrl: `https://x-access-token:abc123@github.com/${baseRepo.owner}/${baseRepo.name}.git`,
name: baseBranch,
},
}),
Expand Down