Skip to content

Commit

Permalink
Fix existing issue search
Browse files Browse the repository at this point in the history
Only search for token, not whole body. Tested running locally.
  • Loading branch information
danielrbradley committed Nov 4, 2024
1 parent 77dae6c commit ee1d261
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion upgrade/steps_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = `
<!-- for upgrade-provider issue searching: pulumiupgradeproviderissue -->
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ee1d261

Please sign in to comment.