File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ type pr struct {
96
96
Created time.Time `json:"created_at"`
97
97
Updated time.Time `json:"updated_at"`
98
98
Labels []struct {
99
- Name string `json:"name"`
99
+ Name string `json:"name"`
100
+ Color string `json:"color"`
100
101
} `json:"labels"`
101
102
}
102
103
@@ -129,7 +130,8 @@ func convertPullRequest(src *pr) *scm.PullRequest {
129
130
var labels []scm.Label
130
131
for _ , label := range src .Labels {
131
132
labels = append (labels , scm.Label {
132
- Name : label .Name ,
133
+ Name : label .Name ,
134
+ Color : label .Color ,
133
135
})
134
136
}
135
137
return & scm.PullRequest {
Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ type pr struct {
97
97
CreatedAt time.Time `json:"created_at"`
98
98
UpdatedAt time.Time `json:"updated_at"`
99
99
Labels []struct {
100
- Name string `json:"name"`
100
+ Name string `json:"name"`
101
+ Color string `json:"color"`
101
102
} `json:"labels"`
102
103
}
103
104
@@ -129,7 +130,8 @@ func convertPullRequest(from *pr) *scm.PullRequest {
129
130
var labels []scm.Label
130
131
for _ , label := range from .Labels {
131
132
labels = append (labels , scm.Label {
132
- Name : label .Name ,
133
+ Name : label .Name ,
134
+ Color : label .Color ,
133
135
})
134
136
}
135
137
return & scm.PullRequest {
Original file line number Diff line number Diff line change 55
55
"node_id" : " MDU6TGFiZWw2MzA2MzQ4MA==" ,
56
56
"url" : " https://api.github.com/repos/bradrydzewski/drone-test-go/labels/bug" ,
57
57
"name" : " bug" ,
58
- "color" : " fc2929 " ,
58
+ "color" : " fc2927 " ,
59
59
"default" : true
60
60
},
61
61
{
Original file line number Diff line number Diff line change 45
45
"Updated": "2018-06-25T19:05:03Z",
46
46
"labels": [
47
47
{
48
- "name": "bug"
48
+ "name": "bug",
49
+ "color": "fc2927"
49
50
},
50
51
{
51
- "name": "documentation"
52
+ "name": "documentation",
53
+ "color": "fc2929"
52
54
}
53
55
]
54
56
},
Original file line number Diff line number Diff line change 57
57
}
58
58
59
59
Label struct {
60
- Name string
60
+ Name string
61
+ Color string
61
62
}
62
63
63
64
// PullRequestService provides access to pull request resources.
You can’t perform that action at this time.
0 commit comments