1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

A modest number of disjointed improvements

This commit is contained in:
Chris Cummer
2018-04-13 14:32:30 -07:00
committed by Chris Cummer
parent 3a3efbd59f
commit 06d4d2c2f7
4 changed files with 59 additions and 73 deletions

View File

@@ -10,39 +10,6 @@ import (
"os"
)
type SearchResult struct {
StartAt int `json:"startAt"`
MaxResults int `json:"maxResults"`
Total int `json:"total"`
Issues []Issue `json:"issues"`
}
type Issue struct {
Expand string `json:"expand"`
ID string `json:"id"`
Self string `json:"self"`
Key string `json:"key"`
IssueFields *IssueFields `json:"fields"`
}
type IssueFields struct {
Summary string `json:"summary"`
IssueType *IssueType `json:"issuetype"`
}
type IssueType struct {
Self string `json:"self"`
ID string `json:"id"`
Description string `json:"description"`
IconURL string `json:"iconUrl"`
Name string `json:"name"`
Subtask bool `json:"subtask"`
}
/* -------------------- -------------------- */
func IssuesFor(username string) (*SearchResult, error) {
url := fmt.Sprintf("/rest/api/2/search?jql=assignee=%s", username)

28
jira/issues.go Normal file
View File

@@ -0,0 +1,28 @@
package jira
import (
)
type Issue struct {
Expand string `json:"expand"`
ID string `json:"id"`
Self string `json:"self"`
Key string `json:"key"`
IssueFields *IssueFields `json:"fields"`
}
type IssueFields struct {
Summary string `json:"summary"`
IssueType *IssueType `json:"issuetype"`
}
type IssueType struct {
Self string `json:"self"`
ID string `json:"id"`
Description string `json:"description"`
IconURL string `json:"iconUrl"`
Name string `json:"name"`
Subtask bool `json:"subtask"`
}

10
jira/search_result.go Normal file
View File

@@ -0,0 +1,10 @@
package jira
import ()
type SearchResult struct {
StartAt int `json:"startAt"`
MaxResults int `json:"maxResults"`
Total int `json:"total"`
Issues []Issue `json:"issues"`
}