diff --git a/models/issues/comment_aggregator.go b/models/issues/comment_aggregator.go index f419a9ebce..9e68377fae 100644 --- a/models/issues/comment_aggregator.go +++ b/models/issues/comment_aggregator.go @@ -31,10 +31,8 @@ func (agg *CommentAggregator) aggregateComment(c *Comment, index int) { if c.Type == CommentTypeClose { agg.IsClosed = true - } else if c.Type == CommentTypeReopen { agg.IsClosed = false - } else if c.Type == CommentTypeReviewRequest { if c.AssigneeID > 0 { req := RequestReviewTarget{User: c.Assignee} @@ -66,7 +64,6 @@ func (agg *CommentAggregator) aggregateComment(c *Comment, index int) { } else { agg.delLabel(c.Label) } - } else if c.Type == CommentTypeAggregator { agg.Merge(c.Aggregator) } @@ -249,17 +246,14 @@ func (agg *CommentAggregator) createAggregatedComment(issue *Issue, final bool) // instead of an aggregator if agg.OnlyLabelsChanged() { comment.Type = CommentTypeLabel - } else if agg.OnlyClosedReopened() { if agg.IsClosed { comment.Type = CommentTypeClose } else { comment.Type = CommentTypeReopen } - } else if agg.OnlyRequestReview() { comment.Type = CommentTypeReviewRequest - } else { comment.Type = CommentTypeAggregator comment.Aggregator = &new_agg