Skip to content

Conversation

@maishivamhoo123
Copy link
Contributor

@maishivamhoo123 maishivamhoo123 commented Feb 9, 2026

BREAKING CHANGE: ListCursorOptions is removed from IssuesService.List and IssuesService.ListByRepo.

Updates: #3976.

Removed unsupported cursor pagination IssuesService.List and IssuesService.ListByRepo by deleting ListCursorOptions from issue option structs. Updated related unit tests accordingly.

@maishivamhoo123
Copy link
Contributor Author

@gmlewis, @alexandear and @Not-Dhananjay-Mishra can you please review this PR?

@gmlewis gmlewis changed the title fix: add pagination support for IssuesService list methods fix!: Add pagination support for IssuesService list methods Feb 9, 2026
@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Feb 9, 2026
@gmlewis gmlewis changed the title fix!: Add pagination support for IssuesService list methods fix!: Fix pagination support for IssuesService list methods 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 (e5024aa) to head (5ba7d6c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3984      +/-   ##
==========================================
- Coverage   93.53%   93.53%   -0.01%     
==========================================
  Files         207      207              
  Lines       17610    17606       -4     
==========================================
- Hits        16471    16467       -4     
  Misses        938      938              
  Partials      201      201              

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

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, @maishivamhoo123!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra

Copy link
Contributor

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra left a comment

Choose a reason for hiding this comment

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

Also SubIssueService.ListByIssue ( Point 3 in #3976 ) also accepts IssueListOptions as one of the parameters so we can also include that in BREAKING CHANGE description


// IssueListOptions specifies the optional parameters to the IssuesService.List
// and IssuesService.ListByOrg methods.
type IssueListOptions struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are updating this struct, How about using * with omitempty fields to be consistent with rest of the repo.

	Filter    *string    `url:"filter,omitempty"`
	State     *string    `url:"state,omitempty"`
	Labels    []string  `url:"labels,comma,omitempty"`
	Sort      *string    `url:"sort,omitempty"`
	Direction *string    `url:"direction,omitempty"`
	Since     *time.Time `url:"since,omitempty"`

After updating please remove these line from .golangci.yml

go-github/.golangci.yml

Lines 290 to 294 in e5024aa

- IssueListOptions.Direction # TODO: Issues
- IssueListOptions.Filter # TODO: Issues
- IssueListOptions.Since # TODO: Issues
- IssueListOptions.Sort # TODO: Issues
- IssueListOptions.State # TODO: Issues

// Since filters issues by time.
Since time.Time `url:"since,omitempty"`

ListCursorOptions
Copy link
Contributor

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

Choose a reason for hiding this comment

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

I apologize for not trying IssuesService.ListByRepo endpoint manually previously. It supports cursor based pagination, so we can undo these changes.
Also, I tried IssuesService.List it works perfectly fine for me with page=100 and per_page=100. But I am not assigned to many issues so someone else please try and verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants