Skip to content

Commit a5c14a9

Browse files
authored
Support Custom Labels (#29)
* replace labels with map (closes #21) * updating changelog
1 parent bb51cd9 commit a5c14a9

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ first. For more complete details see
1717
* Provide a means to ignore marshaling errors
1818
* Update GetEvents() to return the failed lines and remove
1919
the pointer to the return value because it's unnecessary.
20+
* [BREAKING CHANGE] In ec28f77 `ChangeInfo.Labels` has been changed to map
21+
to fix #21.
22+
2023

2124
### 0.1.1
2225

changes.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ type ChangeInfo struct {
261261
Number int `json:"_number"`
262262
Owner AccountInfo `json:"owner"`
263263
Actions map[string]ActionInfo `json:"actions,omitempty"`
264-
Labels Labels `json:"labels,omitempty"`
264+
Labels map[string]LabelInfo `json:"labels,omitempty"`
265265
PermittedLabels map[string][]string `json:"permitted_labels,omitempty"`
266266
RemovableReviewers []AccountInfo `json:"removable_reviewers,omitempty"`
267267
Messages []ChangeMessageInfo `json:"messages,omitempty"`
@@ -272,12 +272,6 @@ type ChangeInfo struct {
272272
BaseChange string `json:"base_change,omitempty"`
273273
}
274274

275-
// Labels entity contains the labels Verified & CodeReview, always corresponding to the current patch set.
276-
type Labels struct {
277-
Verified LabelInfo `json:"Verified,omitempty"`
278-
CodeReview LabelInfo `json:"Code-Review,omitempty"`
279-
}
280-
281275
// LabelInfo entity contains information about a label on a change, always corresponding to the current patch set.
282276
type LabelInfo struct {
283277
Optional bool `json:"optional,omitempty"`

0 commit comments

Comments
 (0)