Browse Source

Remove issue locking/unlocking preview media type.

These changes are now official, so the custom media type is no longer
needed.

Fixes #381.
Fixes #382.
Updates #279.

Change-Id: I33cad47c6645c5292f699826ae117b94260a3044
Dmitri Shuralyov 10 years ago
committed by Glenn Lewis
parent
commit
c31236d1f3
3 changed files with 0 additions and 11 deletions
  1. +0
    -3
      github/github.go
  2. +0
    -6
      github/issues.go
  3. +0
    -2
      github/issues_test.go

+ 0
- 3
github/github.go View File

@ -55,9 +55,6 @@ const (
// https://developer.github.com/changes/2015-11-11-protected-branches-api/
mediaTypeProtectedBranchesPreview = "application/vnd.github.loki-preview+json"
// https://developer.github.com/changes/2016-02-11-issue-locking-api/
mediaTypeIssueLockingPreview = "application/vnd.github.the-key-preview+json"
// https://help.github.com/enterprise/2.4/admin/guides/migrations/exporting-the-github-com-organization-s-repositories/
mediaTypeMigrationsPreview = "application/vnd.github.wyandotte-preview+json"


+ 0
- 6
github/issues.go View File

@ -289,9 +289,6 @@ func (s *IssuesService) Lock(owner string, repo string, number int) (*Response,
return nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeIssueLockingPreview)
return s.client.Do(req, nil)
}
@ -305,8 +302,5 @@ func (s *IssuesService) Unlock(owner string, repo string, number int) (*Response
return nil, err
}
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeIssueLockingPreview)
return s.client.Do(req, nil)
}

+ 0
- 2
github/issues_test.go View File

@ -253,7 +253,6 @@ func TestIssuesService_Lock(t *testing.T) {
mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
testHeader(t, r, "Accept", mediaTypeIssueLockingPreview)
w.WriteHeader(http.StatusNoContent)
})
@ -269,7 +268,6 @@ func TestIssuesService_Unlock(t *testing.T) {
mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
testHeader(t, r, "Accept", mediaTypeIssueLockingPreview)
w.WriteHeader(http.StatusNoContent)
})


Loading…
Cancel
Save