How to get the latest commit date of the file along with content details from GitHub API call #24481
-
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 :
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:
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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
finally got the expected result by using Graphql.here is the complete code
|
Beta Was this translation helpful? Give feedback.
finally got the expected result by using Graphql.here is the complete code