Skip to content

Commit

Permalink
Add is:pull-request to search query when looking for existing PR (#228
Browse files Browse the repository at this point in the history
)

* 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>
  • Loading branch information
iansan5653 and Andarist authored Nov 2, 2022
1 parent 8ec7804 commit bff53cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sharp-pens-matter.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit bff53cc

Please sign in to comment.