Skip to content

Commit

Permalink
Fix a bug in the choice of comment hash.
Browse files Browse the repository at this point in the history
This fixes a bug in displaying comment threads where the hash shown
for the thread (which is what a user would use for replying) was
the hash of the current version of the comment, rather than the
hash of the original comment.

The hash of the original comment was already being correctly picked
as the hash of the thread, but the code was incorrectly displaying
something else in its place.
  • Loading branch information
ojarjur committed Feb 16, 2018
1 parent ca43129 commit 7c60f9d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions commands/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,7 @@ func showSubThread(r *review.Review, thread review.CommentThread, indent string)
}
}
comment := thread.Comment
threadHash, err := comment.Hash()
if err != nil {
return err
}

threadHash := thread.Hash
timestamp := reformatTimestamp(comment.Timestamp)
commentSummary := fmt.Sprintf(indent+commentTemplate, threadHash, comment.Author, timestamp, statusString, comment.Description)
indent = indent + " "
Expand Down

0 comments on commit 7c60f9d

Please sign in to comment.