refactor(dev-infra): several code style and typo fixes (#39135)
This commit addresses comments from [my review][1] on PR #38656 (which was merged without comments addressed). The changes are mostly related to code style and typos. [1]: https://github.com/angular/angular/pull/38656#pullrequestreview-482129333 PR Close #39135
This commit is contained in:
@ -12,16 +12,16 @@ import {GithubConfig} from '../config';
|
||||
import {GitClient} from './index';
|
||||
|
||||
/** URL to the Github page where personal access tokens can be managed. */
|
||||
export const GITHUB_TOKEN_SETTINGS_URL = `https://github.com/settings/tokens`;
|
||||
export const GITHUB_TOKEN_SETTINGS_URL = 'https://github.com/settings/tokens';
|
||||
|
||||
/** URL to the Github page where personal access tokens can be generated. */
|
||||
export const GITHUB_TOKEN_GENERATE_URL = `https://github.com/settings/tokens/new`;
|
||||
export const GITHUB_TOKEN_GENERATE_URL = 'https://github.com/settings/tokens/new';
|
||||
|
||||
/** Adds the provided token to the given Github HTTPs remote url. */
|
||||
export function addTokenToGitHttpsUrl(githubHttpsUrl: string, token: string) {
|
||||
const url = new URL(githubHttpsUrl);
|
||||
url.username = token;
|
||||
return url.toString();
|
||||
return url.href;
|
||||
}
|
||||
|
||||
/** Gets the repository Git URL for the given github config. */
|
||||
@ -36,7 +36,7 @@ export function getRepositoryGitUrl(config: GithubConfig, githubToken?: string):
|
||||
return baseHttpUrl;
|
||||
}
|
||||
|
||||
/** Gets a Github URL that refers to a lists of recent commits within a specified branch. */
|
||||
/** Gets a Github URL that refers to a list of recent commits within a specified branch. */
|
||||
export function getListCommitsInBranchUrl({remoteParams}: GitClient, branchName: string) {
|
||||
return `https://github.com/${remoteParams.owner}/${remoteParams.repo}/commits/${branchName}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user