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
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
closed pull requests, but that is not the case.
I even tried appending some params* to the URL like
?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!