Closed as duplicate of#2828
Description
What happened?
Calling octokit.rest.search.issuesAndPullRequests()
results in a warning:
octokit.rest.search.issuesAndPullRequests() is deprecated, see https://docs.github.com/rest/search/search#search-issues-and-pull-requests
e.g.
const issues = await octokit.rest.search.issuesAndPullRequests({
q: `is:issue AND is:open AND label:bug`,
per_page: 5,
});
Opening the referenced link mentions that use of the endpoint without the advanced_search=true
parameter is deprecated. However, adding that parameter does not suppress the warning (and the endpoint remains crossed out in VS Code):
const issues = await octokit.rest.search.issuesAndPullRequests({
q: `is:issue AND is:open AND label:bug`,
advanced_search: true,
per_page: 5,
});
Is there an alternate endpoint we should be using, or is this a bug in the deprecation of the issuesAndPullRequests endpoint?
Versions
Octokit 4.1.2 (via NPM)
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct