diff --git a/.changeset/sharp-pens-matter.md b/.changeset/sharp-pens-matter.md new file mode 100644 index 00000000..aba14c64 --- /dev/null +++ b/.changeset/sharp-pens-matter.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": patch +--- + +Add `is:pull-request` to search query when looking for existing PR. This fixes an issue with user-owned PATs. diff --git a/src/run.ts b/src/run.ts index 2612393f..ac3b24dc 100644 --- a/src/run.ts +++ b/src/run.ts @@ -291,7 +291,7 @@ export async function runVersion({ }); } - let searchQuery = `repo:${repo}+state:open+head:${versionBranch}+base:${branch}`; + let searchQuery = `repo:${repo}+state:open+head:${versionBranch}+base:${branch}+is:pull-request`; let searchResultPromise = octokit.search.issuesAndPullRequests({ q: searchQuery, });