From c31236d1f334bf0017fc32d606e3478abdb3e3bd Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Wed, 22 Jun 2016 23:25:06 -0700 Subject: [PATCH] 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 --- github/github.go | 3 --- github/issues.go | 6 ------ github/issues_test.go | 2 -- 3 files changed, 11 deletions(-) diff --git a/github/github.go b/github/github.go index 8b19960..3fd4b97 100644 --- a/github/github.go +++ b/github/github.go @@ -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" diff --git a/github/issues.go b/github/issues.go index a8c82db..5d6408d 100644 --- a/github/issues.go +++ b/github/issues.go @@ -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) } diff --git a/github/issues_test.go b/github/issues_test.go index 92e966f..3b436de 100644 --- a/github/issues_test.go +++ b/github/issues_test.go @@ -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) })