Skip to content

Commit

Permalink
repo-wide-file-finder: Use current branch/tag when possible (#4446)
Browse files Browse the repository at this point in the history
Co-authored-by: yakov116 <16872793+yakov116@users.noreply.github.com>
  • Loading branch information
mrdziuban and yakov116 committed Jun 6, 2021
1 parent e948429 commit 161981f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/features/repo-wide-file-finder.tsx
Expand Up @@ -3,16 +3,16 @@ import select from 'select-dom';
import * as pageDetect from 'github-url-detection';

import features from '.';
import {buildRepoURL} from '../github-helpers';
import getDefaultBranch from '../github-helpers/get-default-branch';
import {buildRepoURL, getCurrentCommittish} from '../github-helpers';

async function init(): Promise<void> {
document.body.append(
<a
hidden
data-hotkey="t"
data-pjax="true"
href={buildRepoURL('find', await getDefaultBranch())}
href={buildRepoURL('find', getCurrentCommittish() ?? await getDefaultBranch())}
/>
);
}
Expand Down

0 comments on commit 161981f

Please sign in to comment.