Pygithub: search_issues: I am having issues with query parameters

Created on 24 May 2018  路  1Comment  路  Source: PyGithub/PyGithub

This works:
curl -G -H "Authorization: token myToken" https://api.github.com/search/issues?q=repo:myOrg/myPrivateRepo+is:closed

But when I do this:

g = Github(myToken)
    for i in g.search_issues('repo:myOrg/myPrivateRepo+is:closed'):
        print(i.title)

I get: 'The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.'

But when I drop the + from query it works:

g = Github(myToken)
    for i in g.search_issues('repo:myOrg/myPrivateRepo'):
        print(i.title)

Most helpful comment

Ugh... ok have to use as separator:
g.search_issues('repo:myOrg/myPrivateRepo is:closed'

>All comments

Ugh... ok have to use as separator:
g.search_issues('repo:myOrg/myPrivateRepo is:closed'

Was this page helpful?
0 / 5 - 0 ratings