Merge pull request #2035 from kazuki43zoo/gh-2015_count-conversations

Count multiple comments on the same line
This commit is contained in:
Naoki Takezoe
2018-05-28 23:54:25 +09:00
committed by GitHub

View File

@@ -122,5 +122,8 @@
</script>
@countConversation(comments: Seq[Comment]) = @{
comments.count(c => c.isInstanceOf[CommitComments] || c.asInstanceOf[IssueComment].action.endsWith("comment"))
comments.collect {
case c: CommitComments => c.comments.size
case c: IssueComment if c.action.endsWith("comment") => 1
}.sum
}