From c021890930bc1f1e52ac538e3eab4c2574513dfa Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 14 Aug 2019 23:32:19 +0800 Subject: move CreateReview to moduels/pull (#7841) --- routers/repo/pull_review.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routers/repo') diff --git a/routers/repo/pull_review.go b/routers/repo/pull_review.go index 7576ebe90b..cf93783042 100644 --- a/routers/repo/pull_review.go +++ b/routers/repo/pull_review.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" + pull_service "code.gitea.io/gitea/modules/pull" ) // CreateCodeComment will create a code comment including an pending review if required @@ -53,7 +54,7 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) { } // No pending review exists // Create a new pending review for this issue & user - if review, err = models.CreateReview(models.CreateReviewOptions{ + if review, err = pull_service.CreateReview(models.CreateReviewOptions{ Type: models.ReviewTypePending, Reviewer: ctx.User, Issue: issue, @@ -61,6 +62,7 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) { ctx.ServerError("CreateCodeComment", err) return } + } } if review.ID == 0 { -- cgit v1.2.3