I'm trying to use the github REST api to get pull requests by user. I've read the docs and looked for examples and can't find clear directions how to do this. The basic .../pulls url works just fine - I get back a big list of pull requests. But when I try to filter to a user the way the docs seem to say, I just back an empty array.
I have verified:
- The user names I am trying are correct- I have copied them from the pulls.user.login field
- The users I am trying have pulls that show up in the .../pulls output
Here is what I have tried:
These attempts always return an empty array:
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myusername
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myusername&state=all
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myuserid
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=user:myusername@mydomain
These desperate attempts always return the same output as .../pulls with no parameters
[githost]/api/v3/repos/[owner]/[reponame]/pulls?head=myusername
[githost]/api/v3/repos/[owner]/[reponame]/pulls?user=myusername
So what is the correct way to do this?