Skip to content

Commit

Permalink
Support Custom Labels (#29)
Browse files Browse the repository at this point in the history
* replace labels with map (closes #21)

* updating changelog
  • Loading branch information
opalmer authored Nov 15, 2016
1 parent bb51cd9 commit a5c14a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ first. For more complete details see
* Provide a means to ignore marshaling errors
* Update GetEvents() to return the failed lines and remove
the pointer to the return value because it's unnecessary.
* [BREAKING CHANGE] In ec28f77 `ChangeInfo.Labels` has been changed to map
to fix #21.


### 0.1.1

Expand Down
8 changes: 1 addition & 7 deletions changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ type ChangeInfo struct {
Number int `json:"_number"`
Owner AccountInfo `json:"owner"`
Actions map[string]ActionInfo `json:"actions,omitempty"`
Labels Labels `json:"labels,omitempty"`
Labels map[string]LabelInfo `json:"labels,omitempty"`
PermittedLabels map[string][]string `json:"permitted_labels,omitempty"`
RemovableReviewers []AccountInfo `json:"removable_reviewers,omitempty"`
Messages []ChangeMessageInfo `json:"messages,omitempty"`
Expand All @@ -272,12 +272,6 @@ type ChangeInfo struct {
BaseChange string `json:"base_change,omitempty"`
}

// Labels entity contains the labels Verified & CodeReview, always corresponding to the current patch set.
type Labels struct {
Verified LabelInfo `json:"Verified,omitempty"`
CodeReview LabelInfo `json:"Code-Review,omitempty"`
}

// LabelInfo entity contains information about a label on a change, always corresponding to the current patch set.
type LabelInfo struct {
Optional bool `json:"optional,omitempty"`
Expand Down

0 comments on commit a5c14a9

Please sign in to comment.