1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-20 16:50:28 -05:00

format with gofumpt also

Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
Litchi Pi 2025-01-20 16:54:39 +01:00
parent faad7e0017
commit 8ae2e4b2ef

View file

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