-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: Remove custom Accept headers from search endpoints #3820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove custom Accept headers from search endpoints #3820
Conversation
|
We can't remove preview constants yet: $ grep -r --include='*.go' --exclude='*_test.go' 'mediaTypeTopicsPreview' .
./github/repos_forks.go: req.Header.Set("Accept", mediaTypeTopicsPreview)
./github/teams.go: req.Header.Set("Accept", mediaTypeTopicsPreview)
./github/teams.go: req.Header.Set("Accept", mediaTypeTopicsPreview)
./github/activity_star.go: acceptHeaders := []string{mediaTypeStarring, mediaTypeTopicsPreview}
./github/repos.go: acceptHeaders := []string{mediaTypeTopicsPreview, mediaTypeRepositoryVisibilityPreview}
./github/repos.go: mediaTypeTopicsPreview,
./github/repos.go: req.Header.Set("Accept", mediaTypeTopicsPreview)
./github/repos.go: req.Header.Set("Accept", mediaTypeTopicsPreview)
./github/github.go: mediaTypeTopicsPreview = "application/vnd.github.mercy-preview+json"
$ grep -r --include='*.go' --exclude='*_test.go' 'mediaTypeReactionsPreview' .
./github/issues.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/issues.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/issues.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/issues_comments.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/issues_comments.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/reactions.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/repos_comments.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/repos_comments.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/repos_comments.go: req.Header.Set("Accept", mediaTypeReactionsPreview)
./github/pulls_comments.go: acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeMultiLineCommentsPreview}
./github/pulls_comments.go: acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeMultiLineCommentsPreview}
./github/pulls_comments.go: acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeMultiLineCommentsPreview}
./github/github.go: mediaTypeReactionsPreview = "application/vnd.github.squirrel-girl-preview" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3820 +/- ##
==========================================
- Coverage 92.32% 92.32% -0.01%
==========================================
Files 194 194
Lines 13984 13973 -11
==========================================
- Hits 12911 12900 -11
Misses 884 884
Partials 189 189 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @alexandear!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @zyfy29
stevehipwell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thank you, @stevehipwell! |
The PR removes deprecated preview "Accept" headers from all search endpoints.
The REST API for search was fully launched a long time ago https://docs.github.com/en/rest/search/search