Is API head filter even working?

Hello, i’m trying to fetch PRs by head attribute.

I’m doing :
curl 'https://api.github.com/repositories/284089292/pulls?state=closed&base=bpf-next&head=series/357901=>bpf-next' | grep head -A 2
I’m expecting:
the result will contain only closed pulls sent from head “series/357901=>bpf-next” to base “bpf-next”
like in UI:

What i’ve got:
i’ve got all closed PR for base “bpf-next”.

inb4 - i’ve tried to urlencode, the https://api.github.com/repositories/284089292/pulls?state=closed&base=bpf-next&head=series%2F357901%3D%3Ebpf-next it makes no difference.

Hey @tsipa :wave:

For the head-ref you need to include either the user or org value like: tsipa:series/357901=>bpf-next. We call it out in our docs, here:

…where:

Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name . For example: github:new-script-format or octocat:test-branch .

Give this a try:

curl -L -X GET 'https://api.github.com/repos/tsipa/bpf-next/pulls?state=closed&base=bpf-next&head=tsipa:series/357901=%3Ebpf-next'

Should work! :crossed_fingers: