From 20610fb729cda7382643ddf32890967db661f6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Ga=C4=87e=C5=A1a?= Date: Wed, 9 Aug 2023 15:16:13 +0200 Subject: [PATCH] changing the status of a code comment preserves its edited ts --- internal/api/controller/pullreq/comment_status.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/api/controller/pullreq/comment_status.go b/internal/api/controller/pullreq/comment_status.go index ee57577f4..d6818ab41 100644 --- a/internal/api/controller/pullreq/comment_status.go +++ b/internal/api/controller/pullreq/comment_status.go @@ -73,12 +73,11 @@ func (c *Controller) CommentStatus( return nil } - now := time.Now().UnixMilli() - act.Edited = now - act.Resolved = nil act.ResolvedBy = nil + now := time.Now().UnixMilli() + if in.Status != enum.PullReqCommentStatusActive { // In the future if we add more comment resolved statuses // we'll add the ResolvedReason field and put the reason there.