Skip to content

Commit

Permalink
fix: note github link doesn't work with custom repository
Browse files Browse the repository at this point in the history
  • Loading branch information
amatiasq committed Aug 4, 2022
1 parent 32da7e9 commit fa94bf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/3-github/gh-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { GithubUsername } from './models/GHApiUser';

const GH_API = 'https://api.github.com';

export const ghRepository = getQueryParameter('repo', 'pensieve-data');

export function ghUrl(path: string) {
const result = `${GH_API}${path}`;
const booster = `p=${Date.now()}`;
Expand All @@ -16,7 +18,5 @@ export function ghAuthHeaders(token: GithubToken) {
}

export function ghPublicPage(username: GithubUsername, note: Note) {
return `https://github.com/${username}/pensieve-data/blob/main/note/${note.id}`;
return `https://github.com/${username}/${ghRepository}/blob/main/note/${note.id}`;
}

export const ghRepository = getQueryParameter('repo', 'pensieve-data');

0 comments on commit fa94bf9

Please sign in to comment.