I am a contributor for a git repo in github for a company.
I want to find out who among the contributors are the admins.
How do I find out who is the admin besides going around and asking everyone in the company?
In the top right corner of GitHub.com, click your profile photo, then click Your organizations. Click the name of your organization. Under your organization name, click People. You will see a list of the people in your organization.
Code owners are individuals or teams that are responsible for code in a repository. Project maintainers can add a CODEOWNERS file to their repository to make it easier for others to identify code owners and have code owners be notified to review Issues and Pull Requests.
Open Security for a repository You set Git repository permissions from Project Settings>Repositories. Open the web portal and choose the project where you want to add users or groups. To choose another project, see Switch project, repository, team. Open Project settings>Repositories.
Navigate to the members list, click on each member, and check which rights they are granted on the repo in question. Then go to the repo itself, and under settings, click collaborators, and see who is listed there. You now have a list of people with read/write access to the repo.
If you have push access to this repository, you can use Github API to find collaborators
You will need an access token, the endpoint https://api.github.com/repos/ORG/REPO/collaborators
gives you a list of all collaborators with the list of permission type for each of them :
"permissions": { "admin": true, "push": true, "pull": true }
You can use curl
and jq
(to parse JSON response) like this :
curl https://api.github.com/repos/ORG/REPO/collaborators \ -H "Authorization: Token ACCESS_TOKEN" | \ jq '[ .[] | select(.permissions.admin == true) | .login ]'
You can also use the v4 (GraphQL) API for this:
query { repository (owner:"ORG",name:"REPO") { collaborators (first:100) { totalCount edges { permission node { login name } } pageInfo { endCursor hasNextPage } } } }
and look for results that have "permission": "ADMIN"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With