Skip to content

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

Merged
gmlewis merged 2 commits into
google:masterfrom
alexandear-org:fix/apps-list-repos-headers
Jun 27, 2025
Merged

fix: Remove custom Accept in Apps.ListRepos and Apps.ListUserRepos#3609
gmlewis merged 2 commits into
google:masterfrom
alexandear-org:fix/apps-list-repos-headers

Conversation

@alexandear

Copy link
Copy Markdown
Contributor

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

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.

@codecov

codecovBot commented Jun 27, 2025

Copy link
Copy Markdown

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
Copy Markdown
ContributorAuthor

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:masterJun 27, 2025
@alexandear
alexandear deleted the fix/apps-list-repos-headers branch June 27, 2025 16:28
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto 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

@alexandear@gmlewis