mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-25 17:30:36 +00: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 {
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue