Browse Source

use *[]string for IssueRequest.Labels

Unfortunately this is a breaking change, and having a pointer to a slice
is not very common, but is needed in this case to allow clearing an
issue's labels.

Fixes #181
Will Norris 11 years ago
parent
commit
b3cc8ed78a
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      github/issues.go

+ 6
- 6
github/issues.go View File

@ -49,12 +49,12 @@ func (i Issue) String() string {
// It is separate from Issue above because otherwise Labels
// and Assignee fail to serialize to the correct JSON.
type IssueRequest struct {
Title *string `json:"title,omitempty"`
Body *string `json:"body,omitempty"`
Labels []string `json:"labels,omitempty"`
Assignee *string `json:"assignee,omitempty"`
State *string `json:"state,omitempty"`
Milestone *int `json:"milestone,omitempty"`
Title *string `json:"title,omitempty"`
Body *string `json:"body,omitempty"`
Labels *[]string `json:"labels,omitempty"`
Assignee *string `json:"assignee,omitempty"`
State *string `json:"state,omitempty"`
Milestone *int `json:"milestone,omitempty"`
}
// IssueListOptions specifies the optional parameters to the IssuesService.List


Loading…
Cancel
Save