github-urls.ts (material2-7.3.2) | : | github-urls.ts (material2-7.3.3) | ||
---|---|---|---|---|
/** Gets a Github URL that refers to a lists of recent commits within a specifie d branch. */ | /** Gets a Github URL that refers to a lists of recent commits within a specifie d branch. */ | |||
export function getGithubBranchCommitsUrl(owner: string, repository: string, bra nchName: string) { | export function getGithubBranchCommitsUrl(owner: string, repository: string, bra nchName: string) { | |||
return `https://github.com/${owner}/${repository}/commits/${branchName}`; | 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. */ | /** Gets a Github URL that can be used to create a new release from a given tag. */ | |||
export function getGithubNewReleaseUrl(options: {owner: string, repository: stri ng, | export function getGithubNewReleaseUrl(options: {owner: string, repository: stri ng, | |||
tagName: string, releaseTitle: string}) { | tagName: string, releaseTitle: string, body: string}) { | |||
return `https://github.com/${options.owner}/${options.repository}/releases/new ?` + | return `https://github.com/${options.owner}/${options.repository}/releases/new ?` + | |||
`tag=${encodeURIComponent(options.tagName)}&` + | `tag=${encodeURIComponent(options.tagName)}&` + | |||
`title=${encodeURIComponent(options.releaseTitle)}&`; | `title=${encodeURIComponent(options.releaseTitle)}&` + | |||
`body=${encodeURIComponent(options.body)}`; | ||||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added |