diff options
Diffstat (limited to 'modules/repofiles/action.go')
-rw-r--r-- | modules/repofiles/action.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/repofiles/action.go b/modules/repofiles/action.go index 517c145659..a5a5e151cb 100644 --- a/modules/repofiles/action.go +++ b/modules/repofiles/action.go @@ -31,7 +31,7 @@ func getIssueFromRef(repo *models.Repository, index int64) (*models.Issue, error return issue, nil } -func changeIssueStatus(repo *models.Repository, issue *models.Issue, doer *models.User, status bool) error { +func changeIssueStatus(repo *models.Repository, issue *models.Issue, doer *models.User, closed bool) error { stopTimerIfAvailable := func(doer *models.User, issue *models.Issue) error { if models.StopwatchExists(doer.ID, issue.ID) { @@ -44,7 +44,8 @@ func changeIssueStatus(repo *models.Repository, issue *models.Issue, doer *model } issue.Repo = repo - if err := issue.ChangeStatus(doer, status); err != nil { + comment, err := issue.ChangeStatus(doer, closed) + if err != nil { // Don't return an error when dependencies are open as this would let the push fail if models.IsErrDependenciesLeft(err) { return stopTimerIfAvailable(doer, issue) @@ -52,6 +53,8 @@ func changeIssueStatus(repo *models.Repository, issue *models.Issue, doer *model return err } + notification.NotifyIssueChangeStatus(doer, issue, comment, closed) + return stopTimerIfAvailable(doer, issue) } |