Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search query encoding not working #149

Open
bob-rohan opened this issue Sep 9, 2022 · 1 comment
Open

search query encoding not working #149

bob-rohan opened this issue Sep 9, 2022 · 1 comment

Comments

@bob-rohan
Copy link

This works

curl -v \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer $GH_ENTERPRISE_TOKEN" \
  https://$GH_HOST/api/v3/search/issues\?q\=repo:$REPO_NAME+state:open\&per_page=30\&page=

This does not

from ghapi.all import *
api = GhApi(<token etc..>)
paged(api.search.issues_and_pull_requests, q="repo:<REPO_NAME> state:open')

For debug log debug=print_summary

https://<HOST>/api/v3/search/issues?q=repo%3A<OWNER>%2F<REPO>+state%3Aopen&per_page=30&page=1

See : was replaced with %3A. This I think is what breaks the query, some uri/url encoding happening somewhere

@bob-rohan
Copy link
Author

NB whitespace replaced with + was also not intuative, found this on some go forum and happened to work. But can't workaround the colon issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant