Add is:pull-request to search query when looking for existing PR (#228)

* Add `is:pull-request` to search query when looking for existing PR

* Create sharp-pens-matter.md

* Update .changeset/sharp-pens-matter.md

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
Ian Sanders
2022-11-02 10:23:46 +01:00
committed by GitHub
co-authored by Mateusz Burzyński
parent 8ec7804f3e
commit bff53cc50c
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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.
+1 -1
View File
@@ -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,
});