List pull requests associated with a commit API endpoint not listing closed PRs

Refering to this section of the documentation: https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-a-commit

When I call the /repos/:owner/:repo/commits/:commit_sha/pulls api endpoint, I get all PRs that are related to a commit with the following curl command:

curl -s -X GET -G "https://$GH_ACCESS_TOKEN@api.github.com/repos/$GITHUB_REPOSITORY/commits/$COMMIT_ID/pulls" --header 'Accept: application/vnd.github.groot-preview+json'

Let’s assume the above command returned a JSON object of a PR with ID 10.

Now when I close that PR (not merge), and I try calling this API endpoint again, it does not return any object at all but instead an empty list [].

In the documentation it says that the endpoint returns open and closed pull requests, but that is not the case.

I even tried appending some params* to the URL like ?state=all or ?state=closed but that doesn’t help. * https://developer.github.com/v3/pulls/#list-pull-requests

What could I be doing wrong here?

Thanks in advance for your help!

Hey,
I would love to help but I don’t know much more than you !