ghapi
ghapi copied to clipboard
search query encoding not working
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
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