I have used the below GitHub api and i’am able to get the files details of the path.
[https://github.***.com/api/v3/repos/exampleowner-Management/examplerepo/contents/Compile/Teradata/Tables?access_token=*****](https://github. .com/api/v3/repos/exampleowner-Management/examplerepo/contents/Compile/Teradata/Tables?access_token=** )
The result of this API call is :
[
{
"name": ".DS_Store",
"path": "Compile/Tables/test.ddl",
"sha": "1cef8efa8694678e3b7ab230a6a891afa1a1996d",
"size": 8196,
"url": "***",
"html_url": "***",
"git_url": "***",
"download_url": "***",
"type": "file",
"_links": {
"self": "***",
"git": "***",
"html": "***"
}
}]
I have checked in github and the commitid for this file is not showing the same one which was given in the 'sha ’ key value.
is this API returning some other value in sha?
What i actually need is the download url for the file,commit id and commited date informations.
I have tried using another API ,which is :
[https://github.***.com/api/v3/repos/exampleowner-Management/examplerepo/commits/1cef8efa8694678e3b7ab230a6a891afa1a1996d?access_token=*****](https://github. .com/api/v3/repos/exampleowner-Management/examplerepo/commits/1cef8efa8694678e3b7ab230a6a891afa1a1996d?access_token=** )
but the response of this API for this sha is:
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/enterprise/2.14/v3/repos/commits/#get-a-single-commit"}
does anyone have a solution for this issue.i have tested for other files also and the ‘sha’ value is different from the commit id showing in github.