1
0
Fork 0
forked from forgejo/forgejo

Move issue milestone assign to issue service and move webhook to notification (#8780)

This commit is contained in:
Lunny Xiao 2019-11-02 11:33:20 +08:00 committed by GitHub
parent f518fe6662
commit 8f26397928
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 70 additions and 68 deletions

View file

@ -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"
)
// ChangeMilestoneAssign changes assignment of milestone for issue.
func ChangeMilestoneAssign(issue *models.Issue, doer *models.User, oldMilestoneID int64) (err error) {
if err = models.ChangeMilestoneAssign(issue, doer, oldMilestoneID); err != nil {
return
}
notification.NotifyIssueChangeMilestone(doer, issue, oldMilestoneID)
return nil
}