Reputation: 11
I am trying to get the author on GitHub (and not only the committer) of an old commit +90 days. To say differently, an old commit was committed when naming my account differently (committer = ABC for example). Now I must proof that my email is the one used to do that old commit.
Is there anyway to do so? when using the api github events, I am not able to go further than 90 days.
Upvotes: 1
Views: 105
Reputation: 76964
You can use the GitHub API to fetch it from the API response for that commit using the Git Contents API. For example, to get the data from the initial commit for Git:
$ curl https://api.github.com/repos/git/git/commits/e83c5163316f89bfbde7d9ab23ca2e25604af290
{
"sha": "e83c5163316f89bfbde7d9ab23ca2e25604af290",
"node_id": "MDY6Q29tbWl0MzY1MDI6ZTgzYzUxNjMzMTZmODliZmJkZTdkOWFiMjNjYTJlMjU2MDRhZjI5MA==",
"commit": {
"author": {
"name": "Linus Torvalds",
"email": "[email protected]",
"date": "2005-04-07T22:13:13Z"
},
"committer": {
"name": "Linus Torvalds",
"email": "[email protected]",
"date": "2005-04-07T22:13:13Z"
},
...
},
...
}
The data is in the author
object.
Upvotes: 1