GitHub API Collaborators, anyway to list users with direct access a Repository? #24548
-
With GitHubs API is there anyway to view users with direct access to the repository and exclude the users that are listed under teams? For example if you use the ui to view a repo, goto settings, manage access, We have an admin team, but also have a user with direct admin access on the repository. When i use the api: https://developer.github.com/v3/repos/collaborators/ List Collaborators
It will provide a response back with every user that has access to that repository including users under teams with permission to the repository. If user phil is already in the admin team, and then has also been added under manage access as a user with access to the repo with the role admin, he only shows once when the response is viewed from List Collaborators(it doesn’t list that he has permission under team admin and also as a user directly added with the admin role to the repository, just that he has admin permissions).
We are trying to clean up our repositories and I want to be able to view the user with permissions directly on the repositories and don’t care about users in the teams. Is there anyway to do this with the API? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I found the answer to this just adding ?affiliation=direct at the end of the url returns just users with direct access |
Beta Was this translation helpful? Give feedback.
I found the answer to this just adding ?affiliation=direct at the end of the url returns just users with direct access