API Github - list contributors on a given branch

How to retrieve list of contributors on a branch that is not default. We would like to find the commiters each repo, irrespective of whether their changes made to master (the default branch).

GraphQL Branch and Commit Queries by Repository

This will get you what you’re looking for by repository. You just need to pass the org and repo in as variables, or you can always hard code them.

You’ll have to paginate through the results though if they’re large enough. 

1 Like

Can we do this using the REST API v3?

Can also do this with REST API:

repos/<org>/<reponame>/contributors?sha=<branchname>

1 Like