gh discussion view {<number> | <discussion-url> | <comment-id> | <comment-url>} [flags]
Display the title, body, and other information about a discussion.
To see the comments on a discussion, pass --comments. A few latest replies
of each comment will also be retrieved regardless of the selected ordering.
When --comments is used, terminal output includes the discussion details and comments.
When output is piped or redirected, only the comments are printed.
To see the full reply thread of a single comment, pass a comment node ID or
comment URL as the argument instead of a discussion
(e.g., https://github.com/OWNER/REPO/discussions/123#discussioncomment-456).
Pagination and ordering can be controlled via --order, --limit, and --after flags.
Use --web to open the discussion or comment in a web browser instead.
--after <string>-c,
--comments-q,
--jq <expression>--json <fields>-L,
--limit <int> (default 30)--order <string> (default "newest")-R,
--repo <[HOST/]OWNER/REPO>-t,
--template <string>-w,
--webanswerChosenAt, answerChosenBy, answered, author, body, category, closed, closedAt, comments, createdAt, id, labels, locked, number, reactionGroups, state, stateReason, title, updatedAt, url
# View a discussion by number
$ gh discussion view 123
# View a discussion by URL
$ gh discussion view https://github.com/OWNER/REPO/discussions/123
# View with comments
$ gh discussion view 123 --comments
# View with oldest comments first
$ gh discussion view 123 --comments --order oldest
# Limit to 10 comments
$ gh discussion view 123 --comments --limit 10
# Fetch the next page of comments
$ gh discussion view 123 --comments --after CURSOR
# View the reply thread of a comment by node ID
$ gh discussion view DC_abc123
# View the reply thread of a comment by URL
$ gh discussion view 'https://github.com/OWNER/REPO/discussions/123#discussioncomment-456'
# Paginate through replies
$ gh discussion view DC_abc123 --limit 10 --after CURSOR
# Open in browser
$ gh discussion view 123 --web