0

I am trying to make analysis between issues and commits of a project in git.

I am getting the name and email of the committer and author from git using the command below:

git log --pretty="%an %ae %cn %ce"

I am using 'curl -i "https://api.github.com/repos/<repo-owner>/<repo-name>/issues"' to download the issues. This returns the username[login name] for each issue not the name of the user as it is in the git log report:

{   "url": "https://api.github.com/repos/<repo-owner>/<repo-name>/issues/17625",
    "node_id": "MDExOlB1bGxSZXF1ZXN0NTA5NDYyMjgz",
    "number": 17625,
    "title": "......",
    "user": {
      **"login": "xxxxxx",**
      "id": 43045863,
       ....
      "type": "User",
},

I check if the issue and commit has been made by the same user. Since I cannot get the username of committer, I cannot relate them. Is there a way to get the username of each commit on a project in git?

ftmdida
  • 1
  • 1
  • If you are looking for getting the committer in a project, you can use the api described [here](https://developer.github.com/v3/git/commits/). This assumes you know the commit sha1 in order for you to get it's info. – mnestorov Oct 25 '20 at 09:23
  • This returns me the same information that I get when I use "git log" command, but thank you! – ftmdida Oct 25 '20 at 16:32

0 Answers0