API Github - list contributors


Currently, when hitting the Github’s API to get the list of contributors for a specific repo:

GET /repos/:owner/:repo/collaborators

The list of collaborators I get includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. ( as stated in the documentation here )

I would like to know if there’s a way to get, via the API, only the collaborators specified in the Settings > Collaborators & teams > Collaborators box?


Hi @abezard,

Thank you for being here! You can pass a parameter called affiliation with value outside to get the collaborators you’ve added that aren’t part of the organization the repo belongs to. Here is more info: https://developer.github.com/v3/repos/collaborators/#parameters. I hope that helps!