aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorZettat123 <zettat123@gmail.com>2024-08-26 01:18:19 +0800
committerGitHub <noreply@github.com>2024-08-26 01:18:19 +0800
commit725a3ed9ad110f8354303140f527326c64f42dc8 (patch)
tree0c8cbeebbb19e59455030626cb118ca65d0278de /services
parent41d9eaa9c0bb23e30cfc20185aa2a94e8e294052 (diff)
downloadgitea-725a3ed9ad110f8354303140f527326c64f42dc8.tar.gz
gitea-725a3ed9ad110f8354303140f527326c64f42dc8.zip
Handle "close" actionable references for manual merges (#31879)
Fix #31743
Diffstat (limited to 'services')
-rw-r--r--services/pull/merge.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go
index e19292c31c..eb67e06946 100644
--- a/services/pull/merge.go
+++ b/services/pull/merge.go
@@ -219,6 +219,10 @@ func Merge(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.U
// Reset cached commit count
cache.Remove(pr.Issue.Repo.GetCommitsCountCacheKey(pr.BaseBranch, true))
+ return handleCloseCrossReferences(ctx, pr, doer)
+}
+
+func handleCloseCrossReferences(ctx context.Context, pr *issues_model.PullRequest, doer *user_model.User) error {
// Resolve cross references
refs, err := pr.ResolveCrossReferences(ctx)
if err != nil {
@@ -542,5 +546,6 @@ func MergedManually(ctx context.Context, pr *issues_model.PullRequest, doer *use
notify_service.MergePullRequest(baseGitRepo.Ctx, doer, pr)
log.Info("manuallyMerged[%d]: Marked as manually merged into %s/%s by commit id: %s", pr.ID, pr.BaseRepo.Name, pr.BaseBranch, commitID)
- return nil
+
+ return handleCloseCrossReferences(ctx, pr, doer)
}