From ee1d261a530e5b1b1aa0928c8edd86012f518989 Mon Sep 17 00:00:00 2001 From: Daniel Bradley Date: Mon, 4 Nov 2024 10:44:41 +0000 Subject: [PATCH] Fix existing issue search Only search for token, not whole body. Tested running locally. --- upgrade/steps_helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upgrade/steps_helpers.go b/upgrade/steps_helpers.go index 6c37449..d8f1f43 100644 --- a/upgrade/steps_helpers.go +++ b/upgrade/steps_helpers.go @@ -672,6 +672,7 @@ var getExpectedTargetFromIssues = stepv2.Func11E("From Issues", func(ctx context }) // Hide searchable token in the issue body via an HTML comment to help us find this issue later without requiring labels to be set up. +const upgradeIssueToken = "pulumiupgradeproviderissue" const upgradeIssueBodyTemplate = ` @@ -723,7 +724,7 @@ func upgradeIssueExits(ctx context.Context, title, repoOrg, repoName string) (bo // Search through existing pulumiupgradeproviderissue issues to see if we've already created one for this version. issues, err := searchIssues(ctx, fmt.Sprintf("--repo=%s", repoOrg+"/"+repoName), - fmt.Sprintf("--search=%q", upgradeIssueBodyTemplate), + fmt.Sprintf("--search=%q", upgradeIssueToken), "--state=open") if err != nil { return false, err