From 023e189caa7d8d35af5f2b4f9496bef71c88309f Mon Sep 17 00:00:00 2001 From: IJustDev Date: Fri, 12 Mar 2021 21:13:48 +0100 Subject: [PATCH] fix: #24 remove baseurl field --- package.json | 12 +----------- src/config.ts | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 8cd00d0..4c7738b 100644 --- a/package.json +++ b/package.json @@ -79,19 +79,9 @@ "http://example.com:3000", "https://gitea.com" ], - "description": "The remote gitea instance's url. Should not end with a slash.", + "description": "The remote gitea instance's url. Append base url to this string eg. http://localhost:8080 or http://localhost/gitea", "pattern": "^(https|http)://" }, - "gitea.baseURL": { - "scope": "resource", - "type": "string", - "default": "", - "examples": [ - "/gitea" - ], - "description": "The base url of the Gitea instance.", - "pattern": "" - }, "gitea.owner": { "scope": "resource", "type": "string", diff --git a/src/config.ts b/src/config.ts index 3f44b57..ea28392 100644 --- a/src/config.ts +++ b/src/config.ts @@ -77,8 +77,7 @@ export class Config implements ConfigTypes { } public get repoApiUrl(): string { - return this.instanceURL.replace(/\/$/, "") + "/" + - this.baseURL.replace(/\/$/, "") + + return this.instanceURL.replace(/\/$/, "") + '/api/v1/repos/' + this.owner + '/' + this.repo + '/issues';