Support for Icon Urls
This commit is contained in:
parent
3b87156ddb
commit
d5156c770c
2 changed files with 17 additions and 8 deletions
10
issue.go
10
issue.go
|
|
@ -2,16 +2,16 @@ package jkl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
|
||||||
"encoding/json"
|
|
||||||
"text/template"
|
|
||||||
"sort"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"sort"
|
||||||
|
"strings"
|
||||||
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Search struct {
|
type Search struct {
|
||||||
|
|
@ -20,6 +20,7 @@ type Search struct {
|
||||||
|
|
||||||
type IssueType struct {
|
type IssueType struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
IconURL string `json:",omitempty"`
|
||||||
Fields map[string]*FieldSpec
|
Fields map[string]*FieldSpec
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,6 +93,7 @@ type CommentColl struct {
|
||||||
|
|
||||||
type Status struct {
|
type Status struct {
|
||||||
Name string
|
Name string
|
||||||
|
IconURL string `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type TimeTracking struct {
|
type TimeTracking struct {
|
||||||
|
|
|
||||||
15
jkl.go
15
jkl.go
|
|
@ -15,6 +15,11 @@ import (
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
x := false
|
||||||
|
Verbose = &x
|
||||||
|
}
|
||||||
|
|
||||||
var Verbose *bool
|
var Verbose *bool
|
||||||
var defaultIssue = &JiraIssue{}
|
var defaultIssue = &JiraIssue{}
|
||||||
|
|
||||||
|
|
@ -61,9 +66,10 @@ func GetCreateMeta(projectKey, issueType string) (*CreateMeta, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
b, err := ioutil.ReadAll(resp.Body)
|
b, err := ioutil.ReadAll(resp.Body)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
if err != nil {
|
||||||
}
|
return nil, err
|
||||||
|
}
|
||||||
if resp.StatusCode >= 400 {
|
if resp.StatusCode >= 400 {
|
||||||
fmt.Println("Status code:", resp.StatusCode)
|
fmt.Println("Status code:", resp.StatusCode)
|
||||||
fmt.Println("Response:")
|
fmt.Println("Response:")
|
||||||
|
|
@ -134,7 +140,8 @@ func List(jql string) ([]*JiraIssue, error) {
|
||||||
|
|
||||||
func GetIssue(taskKey string) (*JiraIssue, error) {
|
func GetIssue(taskKey string) (*JiraIssue, error) {
|
||||||
bootHttpClient()
|
bootHttpClient()
|
||||||
path := "api/2/issue/" + taskKey+"?expand=transitions,operations,editmeta"
|
|
||||||
|
path := "api/2/issue/" + taskKey + "?expand=transitions,operations,editmeta"
|
||||||
resp, err := httpClient.Get(path)
|
resp, err := httpClient.Get(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue