Skip to content

fix: Remove custom Accept in Apps.ListRepos and Apps.ListUserRepos #3609

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

Merged
merged 2 commits into from
Jun 27, 2025

Conversation

alexandear
Copy link
Contributor

Copy link
Contributor

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @alexandear!
Quick question - can any of these Preview constants be removed yet?

LGTM.
Merging.

Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.33%. Comparing base (2e26546) to head (80801cc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3609      +/-   ##
==========================================
- Coverage   91.34%   91.33%   -0.01%     
==========================================
  Files         184      184              
  Lines       16180    16166      -14     
==========================================
- Hits        14779    14765      -14     
  Misses       1227     1227              
  Partials      174      174              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexandear
Copy link
Contributor Author

Quick question - can any of these Preview constants be removed yet?

Nope, these constants still used:

❯ 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/search.go:             acceptHeaders = append(acceptHeaders, mediaTypeTopicsPreview)
./github/search.go:             acceptHeaders = append(acceptHeaders, 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' 'mediaTypeRepositoryVisibilityPreview' .
./github/repos.go:      acceptHeaders := []string{mediaTypeTopicsPreview, mediaTypeRepositoryVisibilityPreview}
./github/repos.go:      acceptHeaders := []string{mediaTypeRepositoryTemplatePreview, mediaTypeRepositoryVisibilityPreview}
./github/repos.go:              mediaTypeRepositoryVisibilityPreview,
./github/repos.go:      acceptHeaders := []string{mediaTypeRepositoryTemplatePreview, mediaTypeRepositoryVisibilityPreview}
./github/github.go:     mediaTypeRepositoryVisibilityPreview = "application/vnd.github.nebula-preview+json"

❯ grep -r --include='*.go' --exclude='*_test.go' 'mediaTypeRepositoryTemplatePreview' .
./github/repos.go:      acceptHeaders := []string{mediaTypeRepositoryTemplatePreview, mediaTypeRepositoryVisibilityPreview}
./github/repos.go:      req.Header.Set("Accept", mediaTypeRepositoryTemplatePreview)
./github/repos.go:              mediaTypeRepositoryTemplatePreview,
./github/repos.go:      acceptHeaders := []string{mediaTypeRepositoryTemplatePreview, mediaTypeRepositoryVisibilityPreview}
./github/github.go:     mediaTypeRepositoryTemplatePreview = "application/vnd.github.baptiste-preview+json"

@gmlewis gmlewis merged commit 0c6bd91 into google:master Jun 27, 2025
7 checks passed
@alexandear alexandear deleted the fix/apps-list-repos-headers branch June 27, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants