-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.go
More file actions
94 lines (85 loc) · 1.64 KB
/
data.go
File metadata and controls
94 lines (85 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package jira
type RapidViewsResponse struct {
Views []*struct {
Id int
Name string
CanEdit bool
SprintSupportEnabled bool
}
}
func (rv *RapidViewsResponse) getRapidViewNames() []string {
names := make([]string, 0, len(rv.Views))
for _, view := range rv.Views {
names = append(names, view.Name)
}
return names
}
func (rv *RapidViewsResponse) getBoardId(boardName string) (int, bool) {
for _, view := range rv.Views {
if view.Name == boardName {
return view.Id, true
}
}
return 0, false
}
type SprintsResponse struct {
RapidViewId int
Sprints []struct {
Id int
Name string
State string
}
}
func (sr *SprintsResponse) getSprintNames() []string {
names := make([]string, 0, len(sr.Sprints))
for _, sprint := range sr.Sprints {
names = append(names, sprint.Name)
}
return names
}
func (s *SprintsResponse) getSprintId(sprintName string) (int, bool) {
for _, sprint := range s.Sprints {
if sprint.Name == sprintName {
return sprint.Id, true
}
}
return 0, false
}
type SprintDetailsResponse struct {
Sprint struct {
Id int
Name string
State string
StartDate string
EndDate string
}
}
type SearchResult struct {
Expand string
Issues []struct {
Id string
Key string
Fields struct {
Created string
Issuetype struct {
Name string
}
Labels []string
Timetracking struct {
OriginalEstimateSeconds int
}
}
Changelog struct {
Histories []History
}
}
}
type History struct {
// Id int
Created string
Items []struct {
Field string
FromString string
ToString string
}
}