diff options
author | 2023-05-10 22:58:08 +0800 | |
---|---|---|
committer | 2023-05-10 22:58:08 +0800 | |
commit | 579afb1fae65bc4cd7ef22e6526fce510133d731 (patch) | |
tree | bcc780181157d0f0d5fb2bef23f00bc5e6bcda00 /source/features/fork-source-link-same-view.tsx | |
parent | 1f1045fb2f25580c76ad23dd2312eafb2c9a4073 (diff) | |
download | refined-github-579afb1fae65bc4cd7ef22e6526fce510133d731.tar.gz refined-github-579afb1fae65bc4cd7ef22e6526fce510133d731.tar.zst refined-github-579afb1fae65bc4cd7ef22e6526fce510133d731.zip |
Default branch and current branch detector improvements (#6636)
Diffstat (limited to 'source/features/fork-source-link-same-view.tsx')
-rw-r--r-- | source/features/fork-source-link-same-view.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/fork-source-link-same-view.tsx b/source/features/fork-source-link-same-view.tsx index bfe4de90..fd0de58b 100644 --- a/source/features/fork-source-link-same-view.tsx +++ b/source/features/fork-source-link-same-view.tsx @@ -4,7 +4,7 @@ import * as pageDetect from 'github-url-detection'; import features from '../feature-manager.js'; import GitHubURL from '../github-helpers/github-url.js'; import doesFileExist from '../github-helpers/does-file-exist.js'; -import getDefaultBranch from '../github-helpers/get-default-branch.js'; +import {getDefaultBranchOfRepo} from '../github-helpers/get-default-branch.js'; import {getRepo, getForkedRepo} from '../github-helpers/index.js'; const isFilePath = (): boolean => @@ -34,7 +34,7 @@ async function getEquivalentURL(): Promise<string> { }); if (isFilePath()) { - sameViewUrl.branch = await getDefaultBranch(forkedRepository); + sameViewUrl.branch = await getDefaultBranchOfRepo(forkedRepository); if (!await doesFileExist(sameViewUrl)) { return defaultUrl; } |