From 75c00825a87e7e93d5a984a3c19304307c8aec08 Mon Sep 17 00:00:00 2001 From: Jasper Bok Date: Fri, 14 Jul 2023 19:03:22 +0200 Subject: [PATCH] Add the `Issue` type --- issue.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 issue.go diff --git a/issue.go b/issue.go new file mode 100644 index 0000000..ce64c0a --- /dev/null +++ b/issue.go @@ -0,0 +1,24 @@ +package jiraclient + +import "fmt" + +type Issue struct { + Id string `json:"id"` + Self string `json:"self"` + Key string `json:"key"` + Fields struct { + Summary string `json:"summary"` + Creator User `json:"creator"` + Reporter User `json:"reporter"` + Assignee User `json:"assignee"` + Description string `json:"description"` + Project Project `json:"project"` + Comment struct { + Comments []Comment `json:"comments"` + } `json:"comment"` + } `json:"fields"` +} + +func (i Issue) String() string { + return fmt.Sprintf("%s %s", i.Key, i.Fields.Summary) +}