Skip to content

feat!: Add ListOptions to RepositoriesService.ListAllTopics#3978

Merged
gmlewis merged 3 commits intogoogle:masterfrom
Not-Dhananjay-Mishra:listalltopics
Feb 9, 2026
Merged

feat!: Add ListOptions to RepositoriesService.ListAllTopics#3978
gmlewis merged 3 commits intogoogle:masterfrom
Not-Dhananjay-Mishra:listalltopics

Conversation

@Not-Dhananjay-Mishra
Copy link
Contributor

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra commented Feb 9, 2026

BREAKING CHANGE: RepositoriesService.ListAllTopics now accept one more parameter ListOptions for pagination.

RepositoriesService.ListAllTopics also support pagination acc to docs.

Related: #3976

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra marked this pull request as draft February 9, 2026 02:42
@Not-Dhananjay-Mishra
Copy link
Contributor Author

Interesting, generated test for RepositoriesService.ListAllTopicsIter failed.

@gmlewis
Copy link
Collaborator

gmlewis commented Feb 9, 2026

Does it pass locally?

@gmlewis
Copy link
Collaborator

gmlewis commented Feb 9, 2026

This is the report:

testing .
{
		"name": "n",
		"value": "v",
		"created_at": "2006-01-02T15:04:05Z",
		"updated_at": "2006-01-02T15:04:05Z",
		"visibility": "v",
		"selected_repositories_url": "s",
		"selected_repository_ids": [1,2,3]
	}
--- FAIL: TestRepositoriesService_ListAllTopicsIter (0.00s)
    github-iterators_test.go:6452: Unexpected error: json: cannot unmarshal array into Go value of type github.repositoryTopics
    github-iterators_test.go:6456: client.Repositories.ListAllTopicsIter call 1 got 1 items; want 7
    github-iterators_test.go:6465: Unexpected error: json: cannot unmarshal array into Go value of type github.repositoryTopics
    github-iterators_test.go:6469: client.Repositories.ListAllTopicsIter call 2 got 1 items; want 2
    github-iterators_test.go:6489: Unexpected error: GET http://127.0.0.1:34173/api-v3/repos/topics: 404  []

@Not-Dhananjay-Mishra
Copy link
Contributor Author

Does it pass locally?

It passes for RepositoriesService.ListAllTopics
I didn't run test script after go generate ./...

@Not-Dhananjay-Mishra
Copy link
Contributor Author

So that test fail because it expect a object inside array, but with this case array contain strings...
image

image

@Not-Dhananjay-Mishra
Copy link
Contributor Author

@gmlewis should I update gen-iterators.go to handle this case in this PR?

@gmlewis
Copy link
Collaborator

gmlewis commented Feb 9, 2026

@gmlewis should I update gen-iterators.go to handle this case in this PR?

Yes, I'm expecting that as we handle all these edge cases, that gen-iterators.go will need to be enhanced to handle all of these.

If you prefer, you can create an issue and have someone else or myself work on enhancing gen-iterators.go or you can work on it yourself... I'm fine either way.

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra changed the title feat!: RepositoriesService.ListAllTopics now support pagination via ListOption feat!: RepositoriesService.ListAllTopics now support pagination via ListOptions Feb 9, 2026
@Not-Dhananjay-Mishra Not-Dhananjay-Mishra marked this pull request as ready for review February 9, 2026 12:02
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Feb 9, 2026
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.53%. Comparing base (5bdc954) to head (422dfe2).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3978   +/-   ##
=======================================
  Coverage   93.52%   93.53%           
=======================================
  Files         207      207           
  Lines       17569    17589   +20     
=======================================
+ Hits        16432    16452   +20     
  Misses        937      937           
  Partials      200      200           

☔ 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.

@gmlewis gmlewis changed the title feat!: RepositoriesService.ListAllTopics now support pagination via ListOptions feat!: Add ListOptions to RepositoriesService.ListAllTopics Feb 9, 2026
@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Feb 9, 2026
Copy link
Collaborator

@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, @Not-Dhananjay-Mishra and @alexandear!
LGTM.
Merging.

@gmlewis gmlewis merged commit 33ca0cf into google:master Feb 9, 2026
8 checks passed
@Not-Dhananjay-Mishra Not-Dhananjay-Mishra deleted the listalltopics branch February 9, 2026 14:33
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.

3 participants