Searching for open PRs awaiting review in private repos returns nothing #1806
-
Hi, this is a follow up to this question https://github.com/octokit/rest.js/discussions/1794 that Gregor kindly answered. When I do const reviews = await github.paginate( github.search.issuesAndPullRequests, {
q: 'is:open is:pr review-requested:@me',
} ); it works fine and I get the PRs awaiting my review. However, I was asked to review a PR in a private repo and noticed it didn't returned it. Went to the docs and found that adding However, when I try doing:
I get an empty array Is the syntax different, or is this not supported? Is there any workaround in such case? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Make sure your This worked for me. Make sure your token has the repo scope const octokit = new Octokit({
auth: "[token with repo scope]",
});
const { data } = await octokit.request("GET /search/issues", {
q: "is:open is:pr is:private review-requested:@me",
});
console.log(data); |
Beta Was this translation helpful? Give feedback.
-
Hi Gregor, thanks for your response! The token does have repo scope. This is an OAuth app and the authorization link is created as I tried the proposed solution and it didn't return anything. This is the response:
|
Beta Was this translation helpful? Give feedback.
Hi Gregor, thanks for your response!
The token does have repo scope. This is an OAuth app and the authorization link is created as
https://github.com/login/oauth/authorize?client_id=${ clientId }&scope=repo&state=${ state }
Also, I've another tool in this same app that creates multiple GitHub issues entering them in plain text and I can create them in private repos.
I tried the proposed solution and it didn't return anything. This is the response: