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
|
||||
|
||||
- Authtoken
|
||||
- Port (either 80 or 443) in case that you use docker please enter the exposed port
|
||||
- Domain in format: "example.com"
|
||||
- Repository Owner (may be an organisation): "TestOrganisation"
|
||||
- Repository Name "ExampleRepository"
|
||||
- Repository owner (may be an organisation): "TestOrganisation"
|
||||
- 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).
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"displayName": "Gitea-VSCode",
|
||||
"description": "Gitea Issue Tracker for vs-code",
|
||||
"publisher": "IJustDev",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"engines": {
|
||||
"vscode": "^1.32.0"
|
||||
},
|
||||
@ -77,6 +77,12 @@
|
||||
"default": "",
|
||||
"description": "The remote gitea instance's domain."
|
||||
},
|
||||
"gitea.port": {
|
||||
"scope": "resource",
|
||||
"type": "number",
|
||||
"default": 80,
|
||||
"description": "The remote gitea instance's port."
|
||||
},
|
||||
"gitea.owner": {
|
||||
"scope": "resource",
|
||||
"type": "string",
|
||||
|
@ -3,6 +3,7 @@ import { workspace, window } from 'vscode';
|
||||
interface ConfigStorage {
|
||||
token: string;
|
||||
domain: string;
|
||||
port: number;
|
||||
owner: string;
|
||||
repo: string;
|
||||
ssl: boolean;
|
||||
@ -50,6 +51,14 @@ export class Config implements ConfigTypes {
|
||||
public set 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() {
|
||||
return this.loadConfigValue('owner', 'string');
|
||||
@ -76,7 +85,9 @@ export class Config implements ConfigTypes {
|
||||
}
|
||||
|
||||
public get repoApiUrl() {
|
||||
const prefix = this.ssl ? 'https' : 'http';
|
||||
return prefix + '://' + this.domain + '/api/v1/repos/' + this.owner + '/' + this.repo + '/issues';
|
||||
if (this.ssl || this.port === 443) {
|
||||
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