diff --git a/github/github.go b/github/github.go index 3aa643c..558e673 100644 --- a/github/github.go +++ b/github/github.go @@ -42,9 +42,6 @@ const ( // https://developer.github.com/changes/2014-12-09-new-attributes-for-stars-api/ mediaTypeStarringPreview = "application/vnd.github.v3.star+json" - - // https://developer.github.com/changes/2014-12-08-organization-permissions-api-preview/ - mediaTypeOrganizationsPreview = "application/vnd.github.moondragon+json" ) // A Client manages communication with the GitHub API. diff --git a/github/repos.go b/github/repos.go index 86d9ad0..ed9052c 100644 --- a/github/repos.go +++ b/github/repos.go @@ -122,11 +122,6 @@ type RepositoryListOptions struct { // Default is "asc" when sort is "full_name", otherwise default is "desc". Direction string `url:"direction,omitempty"` - // Include orginization repositories the user has access to. - // This will become the default behavior in the future, but is opt-in for now. - // See https://developer.github.com/changes/2015-01-07-prepare-for-organization-permissions-changes/ - IncludeOrg bool `url:"-"` - ListOptions } @@ -151,10 +146,6 @@ func (s *RepositoriesService) List(user string, opt *RepositoryListOptions) ([]R return nil, nil, err } - if opt != nil && opt.IncludeOrg { - req.Header.Set("Accept", mediaTypeOrganizationsPreview) - } - repos := new([]Repository) resp, err := s.client.Do(req, repos) if err != nil { diff --git a/github/repos_test.go b/github/repos_test.go index 2480b88..3a2c413 100644 --- a/github/repos_test.go +++ b/github/repos_test.go @@ -45,11 +45,10 @@ func TestRepositoriesService_List_specifiedUser(t *testing.T) { "direction": "asc", "page": "2", }) - testHeader(t, r, "Accept", mediaTypeOrganizationsPreview) fmt.Fprint(w, `[{"id":1}]`) }) - opt := &RepositoryListOptions{"owner", "created", "asc", true, ListOptions{Page: 2}} + opt := &RepositoryListOptions{"owner", "created", "asc", ListOptions{Page: 2}} repos, _, err := client.Repositories.List("u", opt) if err != nil { t.Errorf("Repositories.List returned error: %v", err)