Issues with Search REST API: Special Characters Handling #2673
Labels
Status: Up for grabs
Issues that are ready to be worked on by anyone
Type: Bug
Something isn't working as documented
What happened?
Hello,
I am currently using the Octokit library to interact with the GitHub Search REST API, and I am facing to an issue that is impacting my ability to use it effectively:
.Handling of Special Characters: Queries that include certain special characters do not execute as expected. For example, the query containing
return (
fails, whereasreturn(
(without a space before the parenthesis) succeeds. I attempted to resolve this issue usingencodeURI
, as recommended in some discussions on GitHub, but it seems this workaround does not apply effectively when using Octokit to interact with the search API.Here is an example of a failing query:
And a succeeding one:
Could you please provide guidance on how to handle these issues? Are there any recommended practices for managing long queries and special characters specifically through Octokit? Any help would be greatly appreciated as these limitations are hindering my usage of the API for larger, more complex code searches.
Thank you for your assistance.
Versions
Node: v20
Octokit: 3.1.2
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: