Skip to content

pr view: ensure that PR reviews are always rendered in --comments mode#4848

Merged
mislav merged 1 commit intotrunkfrom
pr-view-review-comments
Dec 3, 2021
Merged

pr view: ensure that PR reviews are always rendered in --comments mode#4848
mislav merged 1 commit intotrunkfrom
pr-view-review-comments

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Dec 3, 2021

The GraphQL query for review didn't use to request the TotalCount field, but that field was checked before rendering the conversation thread in pr view --comments. This fixes rendering the conversation thread when a PR only has reviews but no ordinary comments.

if pr.Comments.TotalCount > 0 || pr.Reviews.TotalCount > 0 {

Fixes #4841

The GraphQL query for review didn't use to request the `TotalCount`
field, but that field was checked before rendering the conversation
thread in `pr view --comments`. This fixes rendering the conversation
thread when a PR only has reviews but no ordinary comments.
@mislav mislav requested a review from a team as a code owner December 3, 2021 10:27
@mislav mislav requested review from samcoe and removed request for a team December 3, 2021 10:27
@mislav mislav merged commit 0e3c3bb into trunk Dec 3, 2021
@mislav mislav deleted the pr-view-review-comments branch December 3, 2021 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr view --comments: comments not shown for merged PR

2 participants