diff options
Diffstat (limited to 'services/pull/merge.go')
-rw-r--r-- | services/pull/merge.go | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go index 8ae5f029e8..e5563a89b9 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -426,29 +426,11 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor log.Error("setMerged [%d]: %v", pr.ID, err) } - if err := models.NotifyWatchers(&models.Action{ - ActUserID: doer.ID, - ActUser: doer, - OpType: models.ActionMergePullRequest, - Content: fmt.Sprintf("%d|%s", pr.Issue.Index, pr.Issue.Title), - RepoID: pr.Issue.Repo.ID, - Repo: pr.Issue.Repo, - IsPrivate: pr.Issue.Repo.IsPrivate, - }); err != nil { - log.Error("NotifyWatchers [%d]: %v", pr.ID, err) - } + notification.NotifyMergePullRequest(pr, doer, baseGitRepo) // Reset cached commit count cache.Remove(pr.Issue.Repo.GetCommitsCountCacheKey(pr.BaseBranch, true)) - // Reload pull request information. - if err = pr.LoadAttributes(); err != nil { - log.Error("LoadAttributes: %v", err) - return nil - } - - notification.NotifyIssueChangeStatus(doer, pr.Issue, true) - // Resolve cross references refs, err := pr.ResolveCrossReferences() if err != nil { |