Repository navigation
Conversation
outputResult pretty-prints JSON when stdout is a TTY, so asserting the compact string made the tests depend on the runner's stdout. Parse the written JSON instead, as api.test.ts does. Also drop the request-parameter assertion from the JSON test; the existing --comments test already covers the request.
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
Include the fetched comments in
bee issue view --comments --json, so scripts can read the comments requested by the flag.bee issue view PROJECT-123 --comments --json { ...issue + "comments": [...raw comment objects] }The command uses the existing ascending-order request. JSON output preserves the raw comment objects, including change-log entries, and includes an empty array when no comments are returned. Without
--comments, the issue JSON and API requests stay unchanged.Evidence
mainat707ab80, a live issue's comments API returned one comment, butissue view --comments --jsonomittedcomments.--json commentsreturned{}. Three regression cases failed before the fix.After: The built CLI includes that comment. Both full JSON and
--json commentsmatch the raw API response; issue JSON without the flag remains unchanged.Test plan
vp checkvp testvp run --filter @nulab/bee build--commentsto the API responses.Regression tests cover raw comments in full and filtered JSON, an empty comments array, and unchanged JSON without fetching comments when the flag is absent. They parse the JSON they check, so they pass whether or not stdout is a TTY. Existing tests cover human-readable output and the browser path.
Merge Danger
Door: Two-way
The change can be reverted without a data migration.
Blast Radius: Issue
Adds the requested
commentsproperty to JSON only when--commentsis set. Pagination and human-readable output are unchanged. The request still returns only the 20 oldest comments; #186 tracks that.Closes #184