Repository navigation
Conversation
issue comment --list and issue view --comments requested comments in ascending order without a count, so the API returned only the 20 oldest and the newest comments were unreachable. Add --count, --order, --min-id, and --max-id to issue comment --list, matching pr comments. issue view --comments now pages through every comment by ID, 100 at a time. Closes nulab#186
This branch has not been deployed
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
bee issue comment --listandbee issue view --commentsrequested comments in ascending order without a count, so the API returned only the 20 oldest comments. On an issue with more than 20 comments, the newest ones could not be read.issue comment --listtakes the same paging options aspr comments. Without them it still returns the 20 oldest in ascending order, so existing scripts see no change.--order desc -L 5lists the five newest, and--min-idreads the next page. The help no longer calls the default "all comments".issue view --commentspages through every comment by ID, 100 per request, so it includes the newest comments.Automatic pagination for
--listis left to #128, which proposes an opt-in--paginatefor list commands.Evidence
Read-only runs of the built CLI against a live issue with 26 comments:
issue comment --list --json idissue comment --list --order desc -L 5unknown option '--order'order=desc&count=5from the APIissue comment --list --min-id <ID of the 20th>issue view --commentsThe API treats
minIdas exclusive:minId=<ID>returns the comments after that ID. A build with the page size lowered to 10 (three requests) printed the sameissue view --commentsoutput as the normal build, so no comment is repeated or skipped at a page boundary.The two new tests and the updated
--commentstest failed before the fix and pass after it.Test plan
vp checkvp testvp run --filter @nulab/bee buildvp run --filter @nulab/bee generate:skill:checkbee api issues/:key/comments(table above)Merge Danger
Door: Two-way
The change can be reverted without a data migration.
Blast Radius: Issue
issue view --commentssends one request per 100 comments instead of one request.issue comment --listwithout the new options sends the same request as before.This PR and #185 both change
issue view. They merge cleanly in either order, andvp testpasses on the combined branch.Closes #186