diff options
author | 2020-12-09 15:01:07 +0100 | |
---|---|---|
committer | 2020-12-09 09:01:07 -0500 | |
commit | 4d958628ac65b80aff72f51f4ed1b59b132e1522 (patch) | |
tree | 9b875b913ec1ad26bc05c8f542b20cc21f457524 /source/github-helpers/api.ts | |
parent | ac5d9b4b7b4ec7ac15dd283414d8ffd512de8bf3 (diff) | |
download | refined-github-4d958628ac65b80aff72f51f4ed1b59b132e1522.tar.gz refined-github-4d958628ac65b80aff72f51f4ed1b59b132e1522.tar.zst refined-github-4d958628ac65b80aff72f51f4ed1b59b132e1522.zip |
Fix `new-repo-disable-projects-and-wiki` feature (#3794)
Co-authored-by: Federico <me@fregante.com>
Diffstat (limited to 'source/github-helpers/api.ts')
-rw-r--r-- | source/github-helpers/api.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/github-helpers/api.ts b/source/github-helpers/api.ts index 504e4755..56efbea1 100644 --- a/source/github-helpers/api.ts +++ b/source/github-helpers/api.ts @@ -114,7 +114,7 @@ export const v3 = mem(async ( const {personalToken} = await settings; if (!query.startsWith('https')) { - query = query.startsWith('/') ? query.slice(1) : 'repos/' + getRepo()!.nameWithOwner + '/' + query; + query = query.startsWith('/') ? query.slice(1) : ['repos', getRepo()!.nameWithOwner, query].filter(Boolean).join('/'); } const url = new URL(query, api3); |