summaryrefslogtreecommitdiffstats
path: root/modules/pull/merge.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pull/merge.go')
-rw-r--r--modules/pull/merge.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/modules/pull/merge.go b/modules/pull/merge.go
index ed2fe48379..cf2fb7fc4f 100644
--- a/modules/pull/merge.go
+++ b/modules/pull/merge.go
@@ -292,39 +292,6 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor
go models.HookQueue.Add(pr.Issue.Repo.ID)
}
- l, err := baseGitRepo.CommitsBetweenIDs(pr.MergedCommitID, pr.MergeBase)
- if err != nil {
- log.Error("CommitsBetweenIDs: %v", err)
- return nil
- }
-
- // It is possible that head branch is not fully sync with base branch for merge commits,
- // so we need to get latest head commit and append merge commit manually
- // to avoid strange diff commits produced.
- mergeCommit, err := baseGitRepo.GetBranchCommit(pr.BaseBranch)
- if err != nil {
- log.Error("GetBranchCommit: %v", err)
- return nil
- }
- if mergeStyle == models.MergeStyleMerge {
- l.PushFront(mergeCommit)
- }
-
- p := &api.PushPayload{
- Ref: git.BranchPrefix + pr.BaseBranch,
- Before: pr.MergeBase,
- After: mergeCommit.ID.String(),
- CompareURL: setting.AppURL + pr.BaseRepo.ComposeCompareURL(pr.MergeBase, pr.MergedCommitID),
- Commits: models.ListToPushCommits(l).ToAPIPayloadCommits(pr.BaseRepo.HTMLURL()),
- Repo: pr.BaseRepo.APIFormat(mode),
- Pusher: pr.HeadRepo.MustOwner().APIFormat(),
- Sender: doer.APIFormat(),
- }
- if err = models.PrepareWebhooks(pr.BaseRepo, models.HookEventPush, p); err != nil {
- log.Error("PrepareWebhooks: %v", err)
- } else {
- go models.HookQueue.Add(pr.BaseRepo.ID)
- }
return nil
}