Request
curl --location --request GET 'https://api.github.com/repos/gittestapi123/DataStructure/pulls/1/files' \
Above GET API returns 200 OK
Reponse
{
"sha": "9f4b6d8bfeaf44aaa69872286163784706d1b053",
"filename": "testFile1",
"status": "added",
"additions": 1,
"deletions": 0,
"changes": 1,
"blob_url": "https://github.com/gittestapi123/DataStructure/blob/266f3f884286b84f9d3b50a18e2a2534007a406b/testFile1",
"raw_url": "https://github.com/gittestapi123/DataStructure/raw/266f3f884286b84f9d3b50a18e2a2534007a406b/testFile1",
"contents_url": "https://api.github.com/repos/gittestapi123/DataStructure/contents/testFile1?ref=266f3f884286b84f9d3b50a18e2a2534007a406b",
"patch": "@@ -0,0 +1 @@\n+This is a test file"
}]
But for the same pull request If I submit GET request for GET /repos/{owner}/{repo}/pulls/{pull_number}/merge I get 404 (Even If I include valid authentication header)
Request
curl --location --request GET 'https://api.github.com/repos/gittestapi123/DataStructure/pulls/1/merge' \
Reponse
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged" }
I want to check if a pull request has been merged or not using the above API. Someone please please help on this?
Thanks in advance!