From 84f8ef3df6316cb8fe8048556288452c07da4d7b Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 19 Jan 2022 01:28:38 +0800 Subject: Fix PR comments UI (#18323) Closes: * Review comment cannot be edited #17768 * Changing PR Comment Resolved State Disables Further Changes #18315 --- routers/api/v1/repo/issue_comment.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routers/api/v1/repo') diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go index b929cec373..f90028a0ab 100644 --- a/routers/api/v1/repo/issue_comment.go +++ b/routers/api/v1/repo/issue_comment.go @@ -537,7 +537,9 @@ func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.IsAdmin()) { ctx.Status(http.StatusForbidden) return - } else if comment.Type != models.CommentTypeComment { + } + + if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeReview && comment.Type != models.CommentTypeCode { ctx.Status(http.StatusNoContent) return } -- cgit v1.2.3