issues

Github, Jira, Gitlab issues from Plan 9's acme
Log | Files | Refs | README | LICENSE

commit 4171be12bcdfdcd997aefa33fd0933c43b8543ea
parent a7b2939701debd72eae21b7d57f1df4336008476
Author: Russ Cox <rsc@golang.org>
Date:   Sat, 25 Apr 2015 21:00:00 -0400

issue: add Number and Ref to json output

Diffstat:
Missue/issue.go | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/issue/issue.go b/issue/issue.go @@ -203,6 +203,8 @@ The -json flag causes issue to print the results in JSON format using these data structures: type Issue struct { + Number int + Ref string Title string State string Assignee string @@ -734,6 +736,8 @@ func bulkReadIssuesCached(ids []int) ([]*github.Issue, error) { // If you make changes to the structs, copy them back into the doc comment. type Issue struct { + Number int + Ref string Title string State string Assignee string @@ -777,6 +781,8 @@ func showJSONList(all []*github.Issue) { func toJSON(issue *github.Issue) *Issue { j := &Issue{ + Number: getInt(issue.Number), + Ref: fmt.Sprintf("%s/%s#%d\n", projectOwner, projectRepo, getInt(issue.Number)), Title: getString(issue.Title), State: getString(issue.State), Assignee: getUserLogin(issue.Assignee),