Fixes #9 Version 1.0.1
This commit is contained in:
parent
210b5bbbf5
commit
9bde9b183f
@ -26,9 +26,10 @@ Also do not push the .vscode folder to your repository and doublecheck this part
|
|||||||
### The following details are needed
|
### The following details are needed
|
||||||
|
|
||||||
- Authtoken
|
- Authtoken
|
||||||
|
- Port (either 80 or 443) in case that you use docker please enter the exposed port
|
||||||
- Domain in format: "example.com"
|
- Domain in format: "example.com"
|
||||||
- Repository Owner (may be an organisation): "TestOrganisation"
|
- Repository owner (may be an organisation): "TestOrganisation"
|
||||||
- Repository Name "ExampleRepository"
|
- Repository name "ExampleRepository"
|
||||||
|
|
||||||
When you've finished you can press the refresh button in the open issues section and you'll see the issues of the first 10 pages (only open issues).
|
When you've finished you can press the refresh button in the open issues section and you'll see the issues of the first 10 pages (only open issues).
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"displayName": "Gitea-VSCode",
|
"displayName": "Gitea-VSCode",
|
||||||
"description": "Gitea Issue Tracker for vs-code",
|
"description": "Gitea Issue Tracker for vs-code",
|
||||||
"publisher": "IJustDev",
|
"publisher": "IJustDev",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.32.0"
|
"vscode": "^1.32.0"
|
||||||
},
|
},
|
||||||
@ -77,6 +77,12 @@
|
|||||||
"default": "",
|
"default": "",
|
||||||
"description": "The remote gitea instance's domain."
|
"description": "The remote gitea instance's domain."
|
||||||
},
|
},
|
||||||
|
"gitea.port": {
|
||||||
|
"scope": "resource",
|
||||||
|
"type": "number",
|
||||||
|
"default": 80,
|
||||||
|
"description": "The remote gitea instance's port."
|
||||||
|
},
|
||||||
"gitea.owner": {
|
"gitea.owner": {
|
||||||
"scope": "resource",
|
"scope": "resource",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -3,6 +3,7 @@ import { workspace, window } from 'vscode';
|
|||||||
interface ConfigStorage {
|
interface ConfigStorage {
|
||||||
token: string;
|
token: string;
|
||||||
domain: string;
|
domain: string;
|
||||||
|
port: number;
|
||||||
owner: string;
|
owner: string;
|
||||||
repo: string;
|
repo: string;
|
||||||
ssl: boolean;
|
ssl: boolean;
|
||||||
@ -51,6 +52,14 @@ export class Config implements ConfigTypes {
|
|||||||
this.storage.update('domain', value);
|
this.storage.update('domain', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get port() {
|
||||||
|
return this.loadConfigValue('port', 'number');
|
||||||
|
}
|
||||||
|
|
||||||
|
public set port(value) {
|
||||||
|
this.storage.update('port', value);
|
||||||
|
}
|
||||||
|
|
||||||
public get owner() {
|
public get owner() {
|
||||||
return this.loadConfigValue('owner', 'string');
|
return this.loadConfigValue('owner', 'string');
|
||||||
}
|
}
|
||||||
@ -76,7 +85,9 @@ export class Config implements ConfigTypes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get repoApiUrl() {
|
public get repoApiUrl() {
|
||||||
const prefix = this.ssl ? 'https' : 'http';
|
if (this.ssl || this.port === 443) {
|
||||||
return prefix + '://' + this.domain + '/api/v1/repos/' + this.owner + '/' + this.repo + '/issues';
|
return 'https://' + this.domain + '/api/v1/repos/' + this.owner + '/' + this.repo + '/issues';
|
||||||
|
}
|
||||||
|
return 'http://' + this.domain + ':' + this.port + '/api/v1/repos/' + this.owner + '/' + this.repo + '/issues';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
versions/gitea-vscode-1.0.1.vsix
Normal file
BIN
versions/gitea-vscode-1.0.1.vsix
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user