summaryrefslogtreecommitdiff
path: root/source/github-helpers/api.ts
diff options
context:
space:
mode:
authorGravatar Federico <me@fregante.com> 2020-11-03 00:32:48 -0600
committerGravatar GitHub <noreply@github.com> 2020-11-03 00:32:48 -0600
commit059a3cdca23d9925109e0c8cdb162ab2561aca5e (patch)
treece11c5b5128ecf3a49d273b669df51260e431684 /source/github-helpers/api.ts
parent86ed023904f1545c831e46bb6a690e7853e5eca6 (diff)
downloadrefined-github-059a3cdca23d9925109e0c8cdb162ab2561aca5e.tar.gz
refined-github-059a3cdca23d9925109e0c8cdb162ab2561aca5e.tar.zst
refined-github-059a3cdca23d9925109e0c8cdb162ab2561aca5e.zip
Meta: Extract and extend `getRepositoryInfo` (#3695)20.11.5
Diffstat (limited to 'source/github-helpers/api.ts')
-rw-r--r--source/github-helpers/api.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/github-helpers/api.ts b/source/github-helpers/api.ts
index 575c793e..268d16d2 100644
--- a/source/github-helpers/api.ts
+++ b/source/github-helpers/api.ts
@@ -30,7 +30,7 @@ import * as pageDetect from 'github-url-detection';
import {JsonObject, AsyncReturnType} from 'type-fest';
import optionsStorage from '../options-storage';
-import {getRepoURL} from '.';
+import {getRepo} from '.';
interface JsonError {
message: string;
@@ -105,7 +105,7 @@ export const v3 = mem(async (
const {personalToken} = await settings;
if (!query.startsWith('https')) {
- query = query.startsWith('/') ? query.slice(1) : 'repos/' + getRepoURL() + '/' + query;
+ query = query.startsWith('/') ? query.slice(1) : 'repos/' + getRepo()!.nameWithOwner + '/' + query;
}
const url = new URL(query, api3);