Skip to content

Commit

Permalink
Change getRepoURL to use getPRRepositoryInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
yakov116 committed Oct 23, 2020
1 parent f553445 commit f9b36ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/github-helpers/index.ts
Expand Up @@ -39,7 +39,7 @@ export const getCurrentBranch = (): string | undefined => {

export const isFirefox = navigator.userAgent.includes('Firefox/');

export const getRepoURL = (): string => location.pathname.slice(1).split('/', 2).join('/').toLowerCase();
export const getRepoURL = (): string => getRepositoryInfo().url!.toLowerCase();

// The type requires at least one parameter https://stackoverflow.com/a/49910890
export const buildRepoURL = (...pathParts: Array<string | number> & {0: string}): string => {
Expand Down

0 comments on commit f9b36ea

Please sign in to comment.