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 {
9696 Created time.Time `json:"created_at"`
9797 Updated time.Time `json:"updated_at"`
9898 Labels []struct {
99- Name string `json:"name"`
99+ Name string `json:"name"`
100+ Color string `json:"color"`
100101 } `json:"labels"`
101102}
102103
@@ -129,7 +130,8 @@ func convertPullRequest(src *pr) *scm.PullRequest {
129130 var labels []scm.Label
130131 for _ , label := range src .Labels {
131132 labels = append (labels , scm.Label {
132- Name : label .Name ,
133+ Name : label .Name ,
134+ Color : label .Color ,
133135 })
134136 }
135137 return & scm.PullRequest {
Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ type pr struct {
9797 CreatedAt time.Time `json:"created_at"`
9898 UpdatedAt time.Time `json:"updated_at"`
9999 Labels []struct {
100- Name string `json:"name"`
100+ Name string `json:"name"`
101+ Color string `json:"color"`
101102 } `json:"labels"`
102103}
103104
@@ -129,7 +130,8 @@ func convertPullRequest(from *pr) *scm.PullRequest {
129130 var labels []scm.Label
130131 for _ , label := range from .Labels {
131132 labels = append (labels , scm.Label {
132- Name : label .Name ,
133+ Name : label .Name ,
134+ Color : label .Color ,
133135 })
134136 }
135137 return & scm.PullRequest {
Original file line number Diff line number Diff line change 5555 "node_id" : " MDU6TGFiZWw2MzA2MzQ4MA==" ,
5656 "url" : " https://api.github.com/repos/bradrydzewski/drone-test-go/labels/bug" ,
5757 "name" : " bug" ,
58- "color" : " fc2929 " ,
58+ "color" : " fc2927 " ,
5959 "default" : true
6060 },
6161 {
Original file line number Diff line number Diff line change 4545 "Updated": "2018-06-25T19:05:03Z",
4646 "labels": [
4747 {
48- "name": "bug"
48+ "name": "bug",
49+ "color": "fc2927"
4950 },
5051 {
51- "name": "documentation"
52+ "name": "documentation",
53+ "color": "fc2929"
5254 }
5355 ]
5456 },
Original file line number Diff line number Diff line change 5757 }
5858
5959 Label struct {
60- Name string
60+ Name string
61+ Color string
6162 }
6263
6364 // PullRequestService provides access to pull request resources.
You can’t perform that action at this time.
0 commit comments