Browse Source

Stop using custom media type for Multiple Assignees.

Fixes #399.
Fixes #401.

Change-Id: I97be757ad8672c649076ecbb0a51d60576d29164
Glenn Lewis 10 years ago
committed by Will Norris
parent
commit
dc287189c0
5 changed files with 0 additions and 19 deletions
  1. +0
    -3
      github/github.go
  2. +0
    -6
      github/issues.go
  3. +0
    -6
      github/issues_assignees.go
  4. +0
    -2
      github/issues_assignees_test.go
  5. +0
    -2
      github/issues_test.go

+ 0
- 3
github/github.go View File

@ -73,9 +73,6 @@ const (
// https://developer.github.com/changes/2016-04-04-git-signing-api-preview/
mediaTypeGitSigningPreview = "application/vnd.github.cryptographer-preview+json"
// https://developer.github.com/changes/2016-5-27-multiple-assignees/
mediaTypeMultipleAssigneesPreview = "application/vnd.github.cerberus-preview+json"
// https://developer.github.com/changes/2016-05-23-timeline-preview-api/
mediaTypeTimelinePreview = "application/vnd.github.mockingbird-preview+json"


+ 0
- 6
github/issues.go View File

@ -244,9 +244,6 @@ func (s *IssuesService) Create(owner string, repo string, issue *IssueRequest) (
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeMultipleAssigneesPreview)
i := new(Issue)
resp, err := s.client.Do(req, i)
if err != nil {
@ -266,9 +263,6 @@ func (s *IssuesService) Edit(owner string, repo string, number int, issue *Issue
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeMultipleAssigneesPreview)
i := new(Issue)
resp, err := s.client.Do(req, i)
if err != nil {


+ 0
- 6
github/issues_assignees.go View File

@ -58,9 +58,6 @@ func (s *IssuesService) AddAssignees(owner, repo string, number int, assignees [
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeMultipleAssigneesPreview)
issue := &Issue{}
resp, err := s.client.Do(req, issue)
return issue, resp, err
@ -79,9 +76,6 @@ func (s *IssuesService) RemoveAssignees(owner, repo string, number int, assignee
return nil, nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeMultipleAssigneesPreview)
issue := &Issue{}
resp, err := s.client.Do(req, issue)
return issue, resp, err


+ 0
- 2
github/issues_assignees_test.go View File

@ -109,7 +109,6 @@ func TestIssuesService_AddAssignees(t *testing.T) {
json.NewDecoder(r.Body).Decode(&assignees)
testMethod(t, r, "POST")
testHeader(t, r, "Accept", mediaTypeMultipleAssigneesPreview)
want := []string{"user1", "user2"}
if !reflect.DeepEqual(assignees.Assignees, want) {
t.Errorf("assignees = %+v, want %+v", assignees, want)
@ -139,7 +138,6 @@ func TestIssuesService_RemoveAssignees(t *testing.T) {
json.NewDecoder(r.Body).Decode(&assignees)
testMethod(t, r, "DELETE")
testHeader(t, r, "Accept", mediaTypeMultipleAssigneesPreview)
want := []string{"user1", "user2"}
if !reflect.DeepEqual(assignees.Assignees, want) {
t.Errorf("assignees = %+v, want %+v", assignees, want)


+ 0
- 2
github/issues_test.go View File

@ -188,7 +188,6 @@ func TestIssuesService_Create(t *testing.T) {
json.NewDecoder(r.Body).Decode(v)
testMethod(t, r, "POST")
testHeader(t, r, "Accept", mediaTypeMultipleAssigneesPreview)
if !reflect.DeepEqual(v, input) {
t.Errorf("Request body = %+v, want %+v", v, input)
}
@ -223,7 +222,6 @@ func TestIssuesService_Edit(t *testing.T) {
json.NewDecoder(r.Body).Decode(v)
testMethod(t, r, "PATCH")
testHeader(t, r, "Accept", mediaTypeMultipleAssigneesPreview)
if !reflect.DeepEqual(v, input) {
t.Errorf("Request body = %+v, want %+v", v, input)
}


Loading…
Cancel
Save