summaryrefslogtreecommitdiffstats
path: root/services/issue/milestone.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/issue/milestone.go')
-rw-r--r--services/issue/milestone.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/services/issue/milestone.go b/services/issue/milestone.go
index 287f8ae285..af337c3f14 100644
--- a/services/issue/milestone.go
+++ b/services/issue/milestone.go
@@ -8,15 +8,14 @@ import (
"context"
"fmt"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
issues_model "code.gitea.io/gitea/models/issues"
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/notification"
)
-func changeMilestoneAssign(ctx context.Context, doer *user_model.User, issue *models.Issue, oldMilestoneID int64) error {
- if err := models.UpdateIssueCols(ctx, issue, "milestone_id"); err != nil {
+func changeMilestoneAssign(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, oldMilestoneID int64) error {
+ if err := issues_model.UpdateIssueCols(ctx, issue, "milestone_id"); err != nil {
return err
}
@@ -37,15 +36,15 @@ func changeMilestoneAssign(ctx context.Context, doer *user_model.User, issue *mo
return err
}
- opts := &models.CreateCommentOptions{
- Type: models.CommentTypeMilestone,
+ opts := &issues_model.CreateCommentOptions{
+ Type: issues_model.CommentTypeMilestone,
Doer: doer,
Repo: issue.Repo,
Issue: issue,
OldMilestoneID: oldMilestoneID,
MilestoneID: issue.MilestoneID,
}
- if _, err := models.CreateCommentCtx(ctx, opts); err != nil {
+ if _, err := issues_model.CreateCommentCtx(ctx, opts); err != nil {
return err
}
}
@@ -54,7 +53,7 @@ func changeMilestoneAssign(ctx context.Context, doer *user_model.User, issue *mo
}
// ChangeMilestoneAssign changes assignment of milestone for issue.
-func ChangeMilestoneAssign(issue *models.Issue, doer *user_model.User, oldMilestoneID int64) (err error) {
+func ChangeMilestoneAssign(issue *issues_model.Issue, doer *user_model.User, oldMilestoneID int64) (err error) {
ctx, committer, err := db.TxContext()
if err != nil {
return err