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
|
@ -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 New Issue
Block a user