Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Custom Labels #29

Merged
merged 2 commits into from
Nov 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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