Easy methods to Get Pull Request Knowledge Utilizing GitHub API | by Soner Yıldırım | Sep, 2024

Getting the diff between any two commits

Photograph by Bofu Shaw on Unsplash

GitHub is the Wikipedia of code. Not all the things in GitHub may be taken with no consideration however it comprises the essence and historical past of how a number of the finest software program instruments are created.

It’d be a disgrace to not have an API for accessing such a worthwhile useful resource. Fortunately, we do have one and it’s referred to as, surprisingly, GitHub API.

Let me first point out what this text is just not about. We gained’t be speaking about git feedback or the way to use git in software program growth.

This text is extra about utilizing GitHub API for analytical functions. The before everything requirement for analytics is information and GitHub has plenty of it.

The quantity and number of info we will get from GitHub API is solely superb. Additionally, it’s a effectively maintained and documented API so we gained’t have a tough time getting the data we want.

We will get plenty of information from GitHub API resembling:

  • Commits per pull request
  • Folder and file construction of a repository
  • Common variety of information edited per commit
  • Developer-based information resembling who pushed essentially the most commits within the final month
  • File-based information resembling…