summaryrefslogtreecommitdiffstats
path: root/services/forms/repo_form.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/forms/repo_form.go')
-rw-r--r--services/forms/repo_form.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go
index 23ac1abe3c..c9327bbd9b 100644
--- a/services/forms/repo_form.go
+++ b/services/forms/repo_form.go
@@ -11,6 +11,7 @@ import (
"strings"
"code.gitea.io/gitea/models"
+ issues_model "code.gitea.io/gitea/models/issues"
project_model "code.gitea.io/gitea/models/project"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
@@ -636,18 +637,18 @@ func (f *SubmitReviewForm) Validate(req *http.Request, errs binding.Errors) bind
}
// ReviewType will return the corresponding ReviewType for type
-func (f SubmitReviewForm) ReviewType() models.ReviewType {
+func (f SubmitReviewForm) ReviewType() issues_model.ReviewType {
switch f.Type {
case "approve":
- return models.ReviewTypeApprove
+ return issues_model.ReviewTypeApprove
case "comment":
- return models.ReviewTypeComment
+ return issues_model.ReviewTypeComment
case "reject":
- return models.ReviewTypeReject
+ return issues_model.ReviewTypeReject
case "":
- return models.ReviewTypeComment // default to comment when doing quick-submit (Ctrl+Enter) on the review form
+ return issues_model.ReviewTypeComment // default to comment when doing quick-submit (Ctrl+Enter) on the review form
default:
- return models.ReviewTypeUnknown
+ return issues_model.ReviewTypeUnknown
}
}
@@ -655,7 +656,7 @@ func (f SubmitReviewForm) ReviewType() models.ReviewType {
func (f SubmitReviewForm) HasEmptyContent() bool {
reviewType := f.ReviewType()
- return (reviewType == models.ReviewTypeComment || reviewType == models.ReviewTypeReject) &&
+ return (reviewType == issues_model.ReviewTypeComment || reviewType == issues_model.ReviewTypeReject) &&
len(strings.TrimSpace(f.Content)) == 0
}