Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove community health preview header
  • Loading branch information
nightlark committed Sep 4, 2021
commit da6259674d082771a40102a496b43354861eb5cb
3 changes: 0 additions & 3 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ const (
// https://developer.github.com/changes/2017-02-28-user-blocking-apis-and-webhook/
mediaTypeBlockUsersPreview = "application/vnd.github.giant-sentry-fist-preview+json"

// https://developer.github.com/changes/2017-02-09-community-health/
mediaTypeRepositoryCommunityHealthMetricsPreview = "application/vnd.github.black-panther-preview+json"

// https://developer.github.com/changes/2017-05-23-coc-api/
mediaTypeCodesOfConductPreview = "application/vnd.github.scarlet-witch-preview+json"

Expand Down
3 changes: 0 additions & 3 deletions github/repos_community_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ func (s *RepositoriesService) GetCommunityHealthMetrics(ctx context.Context, own
return nil, nil, err
}

// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeRepositoryCommunityHealthMetricsPreview)

metrics := &CommunityHealthMetrics{}
resp, err := s.client.Do(ctx, req, metrics)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion github/repos_community_health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func TestRepositoriesService_GetCommunityHealthMetrics(t *testing.T) {

mux.HandleFunc("/repos/o/r/community/profile", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testHeader(t, r, "Accept", mediaTypeRepositoryCommunityHealthMetricsPreview)
fmt.Fprintf(w, `{
"health_percentage": 100,
"description": "My first repository on GitHub!",
Expand Down