mirror of
https://github.com/go-gitea/gitea
synced 2024-11-10 20:11:19 +01:00
Load issue before accessing index in merge message (#22822)
Fixes #22821 Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
5ae07d4c2f
commit
4dd7d61ac8
1 changed files with 3 additions and 0 deletions
|
@ -98,6 +98,9 @@ func GetDefaultMergeMessage(ctx context.Context, baseGitRepo *git.Repository, pr
|
||||||
}
|
}
|
||||||
for _, ref := range refs {
|
for _, ref := range refs {
|
||||||
if ref.RefAction == references.XRefActionCloses {
|
if ref.RefAction == references.XRefActionCloses {
|
||||||
|
if err := ref.LoadIssue(ctx); err != nil {
|
||||||
|
return "", "", err
|
||||||
|
}
|
||||||
closeIssueIndexes = append(closeIssueIndexes, fmt.Sprintf("%s %s%d", closeWord, issueReference, ref.Issue.Index))
|
closeIssueIndexes = append(closeIssueIndexes, fmt.Sprintf("%s %s%d", closeWord, issueReference, ref.Issue.Index))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue