Files
angular__angular/tools/release/git/github-urls.ts
T
Paul Gschwendtner acf07d18a9 build: publish script should not print error if tag does not exist (#15080)
Currently the publish script prints an error if the release tag does not exist locally yet. This is not expected since the function
that calls `git` to check if a given tag exists, returns a boolean and should not additionally print the git `stderr`.

Note we can also look into attaching the release notes automatically, but since the release notes are making the URL too large and Github denies too large URL's, this is something we can explore in a follow-ups.
2019-02-05 07:36:18 -08:00

14 lines
683 B
TypeScript

/** Gets a Github URL that refers to a lists of recent commits within a specified branch. */
export function getGithubBranchCommitsUrl(owner: string, repository: string, branchName: string) {
return `https://github.com/${owner}/${repository}/commits/${branchName}`;
}
/** Gets a Github URL that can be used to create a new release from a given tag. */
export function getGithubNewReleaseUrl(options: {owner: string, repository: string,
tagName: string, releaseTitle: string}) {
return `https://github.com/${options.owner}/${options.repository}/releases/new?` +
`tag=${encodeURIComponent(options.tagName)}&` +
`title=${encodeURIComponent(options.releaseTitle)}&`;
}