diff options
Diffstat (limited to 'services/issue/label.go')
-rw-r--r-- | services/issue/label.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/services/issue/label.go b/services/issue/label.go new file mode 100644 index 0000000000..4af8c2b97e --- /dev/null +++ b/services/issue/label.go @@ -0,0 +1,21 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package issue + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/notification" +) + +// ClearLabels clears all of an issue's labels +func ClearLabels(issue *models.Issue, doer *models.User) (err error) { + if err = issue.ClearLabels(doer); err != nil { + return + } + + notification.NotifyIssueClearLabels(doer, issue) + + return nil +} |