From 03e5768a447b55381f7517a9d27bb51831893d31 Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Fri, 13 Dec 2024 17:45:00 -0500 Subject: [PATCH] issue #33829: allow pr-creator to work with GH app auth --- robots/pr-creator/updater/updater.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/robots/pr-creator/updater/updater.go b/robots/pr-creator/updater/updater.go index c454e96f9b9f..43728a8d2acd 100644 --- a/robots/pr-creator/updater/updater.go +++ b/robots/pr-creator/updater/updater.go @@ -33,7 +33,7 @@ const ( type updateClient interface { UpdatePullRequest(org, repo string, number int, title, body *string, open *bool, branch *string, canModify *bool) error BotUser() (*github.UserData, error) - FindIssues(query, sort string, asc bool) ([]github.Issue, error) + FindIssuesWithOrg(org, query, sort string, asc bool) ([]github.Issue, error) } type ensureClient interface { @@ -74,7 +74,7 @@ func updatePRWithQueryTokens(org, repo, title, body, queryTokensString string, g return nil, fmt.Errorf("bot name: %w", err) } - issues, err := gc.FindIssues(fmt.Sprintf("is:open is:pr archived:false repo:%s/%s author:%s %s", org, repo, me.Login, queryTokensString), "updated", false) + issues, err := gc.FindIssuesWithOrg(org, fmt.Sprintf("is:open is:pr archived:false repo:%s/%s author:%s %s", org, repo, me.Login, queryTokensString), "updated", false) if err != nil { return nil, fmt.Errorf("find issues: %w", err) } else if len(issues) == 0 {