aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorJohn Olheiser2023-02-08 20:47:52 -0600
committerGitHub2023-02-09 10:47:52 +0800
commit4dd7d61ac8c8bff81a0f9e376032f45eb12f51a9 (patch)
tree58d568501d4365a1e0eb30e8f08a7ba004c7b3ec /services
parent5ae07d4c2f7bd0f58a15292fb93f2e0af45ab351 (diff)
Load issue before accessing index in merge message (#22822)
Fixes #22821 Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'services')
-rw-r--r--services/pull/merge.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go
index edd5b601d..a3d69df8d 100644
--- a/services/pull/merge.go
+++ b/services/pull/merge.go
@@ -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))
}
}