diff --git a/services/pull/merge.go b/services/pull/merge.go index ddfac5a2199..2ae23b34471 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -99,6 +99,9 @@ func GetDefaultMergeMessage(baseGitRepo *git.Repository, pr *issues_model.PullRe } for _, ref := range refs { if ref.RefAction == references.XRefActionCloses { + if err := ref.LoadIssue(); err != nil { + return "", err + } closeIssueIndexes = append(closeIssueIndexes, fmt.Sprintf("%s %s%d", closeWord, issueReference, ref.Issue.Index)) } }