diff options
Diffstat (limited to 'services/issue/label.go')
-rw-r--r-- | services/issue/label.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/services/issue/label.go b/services/issue/label.go index c8ef9e9536..96df7ed345 100644 --- a/services/issue/label.go +++ b/services/issue/label.go @@ -6,11 +6,12 @@ package issue import ( "code.gitea.io/gitea/models" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/notification" ) // ClearLabels clears all of an issue's labels -func ClearLabels(issue *models.Issue, doer *models.User) (err error) { +func ClearLabels(issue *models.Issue, doer *user_model.User) (err error) { if err = issue.ClearLabels(doer); err != nil { return } @@ -21,7 +22,7 @@ func ClearLabels(issue *models.Issue, doer *models.User) (err error) { } // AddLabel adds a new label to the issue. -func AddLabel(issue *models.Issue, doer *models.User, label *models.Label) error { +func AddLabel(issue *models.Issue, doer *user_model.User, label *models.Label) error { if err := models.NewIssueLabel(issue, label, doer); err != nil { return err } @@ -31,7 +32,7 @@ func AddLabel(issue *models.Issue, doer *models.User, label *models.Label) error } // AddLabels adds a list of new labels to the issue. -func AddLabels(issue *models.Issue, doer *models.User, labels []*models.Label) error { +func AddLabels(issue *models.Issue, doer *user_model.User, labels []*models.Label) error { if err := models.NewIssueLabels(issue, labels, doer); err != nil { return err } @@ -41,7 +42,7 @@ func AddLabels(issue *models.Issue, doer *models.User, labels []*models.Label) e } // RemoveLabel removes a label from issue by given ID. -func RemoveLabel(issue *models.Issue, doer *models.User, label *models.Label) error { +func RemoveLabel(issue *models.Issue, doer *user_model.User, label *models.Label) error { if err := issue.LoadRepo(); err != nil { return err } @@ -66,7 +67,7 @@ func RemoveLabel(issue *models.Issue, doer *models.User, label *models.Label) er } // ReplaceLabels removes all current labels and add new labels to the issue. -func ReplaceLabels(issue *models.Issue, doer *models.User, labels []*models.Label) error { +func ReplaceLabels(issue *models.Issue, doer *user_model.User, labels []*models.Label) error { old, err := models.GetLabelsByIssueID(issue.ID) if err != nil { return err |