From d01f0dc17c4301db3c1bd899fa5d1206d979645b Mon Sep 17 00:00:00 2001 From: IJustDev Date: Fri, 12 Apr 2019 14:22:59 +0200 Subject: [PATCH] ADDED: From property to changelog at section unreleased and clearify the instructions to use this extension --- CHANGELOG.md | 6 ++++++ README.md | 2 +- src/issue.ts | 1 + src/issueProvider.ts | 12 +++++------- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e39cf..c27a49d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,9 +41,15 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ### Added: - Label dependent icons now allow the user to use the colors from the Gitea server + ## [Unreleased] - Initial release +### [0.0.6] / [0.0.7] +- From" Property of issue now displays the creater of an issue + + + [#1](https://github.com/IJustDev/Gitea-VSCode/issues/1) [#2](https://github.com/IJustDev/Gitea-VSCode/issues/2) \ No newline at end of file diff --git a/README.md b/README.md index da8955b..a25d8c7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Issuetracker for Gitea ## Getting Started -To setup a gitea issue tracked project you need to first select the issues tab at the activitiy bar. After that open the command palette in order to enter your crendentials: +To setup a gitea issue tracked project you need to first select the issues tab at the activitiy bar. After that open the command palette in order to type in the command `Initialize Gitea-Issue Tracker` and enter your crendentials: - Authtoken - Domain in format: "example.com" - Repository Owner (may be an organisation): "TestOrganisation" diff --git a/src/issue.ts b/src/issue.ts index 208e893..8147acd 100644 --- a/src/issue.ts +++ b/src/issue.ts @@ -9,6 +9,7 @@ export class Issue extends vscode.TreeItem { public body: string, public issueState: string, public assignee: string, + public creator: string, public labels: any[], public collapsibleState: vscode.TreeItemCollapsibleState, public readonly command?: vscode.Command) { diff --git a/src/issueProvider.ts b/src/issueProvider.ts index cf0e18c..8ecdae2 100644 --- a/src/issueProvider.ts +++ b/src/issueProvider.ts @@ -119,12 +119,9 @@ export function getChildren(element: Issue | undefined, issueList: Issue[]) { let childItems: vscode.TreeItem[] = [ new vscode.TreeItem("Assignee - " + element.assignee, vscode.TreeItemCollapsibleState.None), new vscode.TreeItem("State - " + element.issueState, vscode.TreeItemCollapsibleState.None), - new vscode.TreeItem("ID - " + element.issueId, vscode.TreeItemCollapsibleState.None) + new vscode.TreeItem("ID - " + element.issueId, vscode.TreeItemCollapsibleState.None), + new vscode.TreeItem("From - " + element.creator, vscode.TreeItemCollapsibleState.None) ]; - for (let i = 0; i != element.labels.length; i++) { - const label = element.labels[i]; - childItems.push(new vscode.TreeItem(label.name, vscode.TreeItemCollapsibleState.None)); - } return Promise.resolve(childItems); } @@ -149,9 +146,10 @@ export function parseToIssues(res: any, issueList: any[], collapsibleState: vsco const state = issue["state"]; const assignee = issue["assignee"] === null ? "None" : issue["assignee"]["username"]; const labels = issue["labels"]; - const tmpIssue = new Issue("#" + id + " - " + title, id, body, state, assignee, labels, collapsibleState); + const creator = issue["user"]["username"]; + const tmpIssue = new Issue("#" + id + " - " + title, id, body, state, assignee, creator, labels, collapsibleState); const issueForList = new Issue(tmpIssue.label, tmpIssue.issueId, tmpIssue.body, tmpIssue.issueState, - tmpIssue.assignee, tmpIssue.labels, tmpIssue.collapsibleState, { + tmpIssue.assignee, tmpIssue.creator, tmpIssue.labels, tmpIssue.collapsibleState, { command: 'giteaIssues.openIssue', title: '', arguments: [tmpIssue],