fix: auto-paginate channel list without --all too#15
Closed
jonathanlam wants to merge 1 commit into
Closed
Conversation
The previous fix only auto-paginated conversations.list when --all was set. Plain `channel list` (users.conversations, the bot's member channels) still made a single call, so a bot in more channels than fit on one page would silently miss some of them — the same failure mode --all had, just scoped to membership instead of the whole workspace. auto-paginate now applies whenever no explicit --cursor is given, regardless of --all.
|
This PR is being prevented from merging because you have not added exactly one label (patch, minor, major, no-release) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #14. That fix made
channel list --allauto-paginate acrossconversations.list, but gated the auto-pagination onAll— plainchannel list(users.conversations, the channels the bot is a member of) still only fetched a single page. A bot that's a member of more channels than fit on one page would silently miss the rest, the same underlying failure mode as #14 just scoped to membership instead of the whole workspace.--cursoris given, for bothusers.conversations(default) andconversations.list(--all)--cursorstill fetches a single page in either mode, for manual/resume useTest plan
go build ./...go vet ./...go test ./...— added coverage for member-only (non---all) auto-pagination and explicit-cursor-without---allsingle-page behaviorNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.