diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-08-14 23:32:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 23:32:19 +0800 |
commit | c021890930bc1f1e52ac538e3eab4c2574513dfa (patch) | |
tree | 60d41ae2b96f562d7d251ed5d76a29a3e142f16f /routers/repo | |
parent | eaa4d4ea98e62ebbc44039d0a01604a464d3ad2a (diff) | |
download | gitea-c021890930bc1f1e52ac538e3eab4c2574513dfa.tar.gz gitea-c021890930bc1f1e52ac538e3eab4c2574513dfa.zip |
move CreateReview to moduels/pull (#7841)
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/pull_review.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |