Load issue before accessing index in merge message (#22822) (#22830)

Backport #22822

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
pull/22837/head^2
John Olheiser 2 years ago committed by GitHub
parent 638fbd0b78
commit 68b908d92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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))
}
}

Loading…
Cancel
Save