From b3cc8ed78ab0a1b7160cbb87dc78310f1c857ff4 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Tue, 28 Apr 2015 07:52:39 -0700 Subject: [PATCH] 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 --- github/issues.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/github/issues.go b/github/issues.go index f92df6b..1d51a3d 100644 --- a/github/issues.go +++ b/github/issues.go @@ -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