User Tools

Site Tools


tasks:github_permissions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tasks:github_permissions [2020/05/15 14:54]
djgalloway created
tasks:github_permissions [2021/07/14 19:14] (current)
djgalloway [Listing All Users]
Line 8: Line 8:
   - Enter the user's GitHub username   - Enter the user's GitHub username
   - {{:​tasks:​invite.png?​nolink}}   - {{:​tasks:​invite.png?​nolink}}
 +
 +==== Listing All Users in All Teams ====
 +Make sure you have a github API token written to ''​~/​.github_token''​
 +
 +<​code>​
 +for num in {1..10}; do for url in $(curl -s -H "​Accept:​ application/​vnd.github.v3+json"​ -H "​Authorization:​ token $(cat ~/​.github_token)" ​ https://​api.github.com/​orgs/​ceph/​teams | jq '​.[].url'​ | tr -d '"'​);​ do curl -s -H "​Accept:​ application/​vnd.github.v3+json"​ -H "​Authorization:​ token $(cat ~/​.github_token)"​ ${url}/​members | jq '​.[].login'​ | tr -d '"';​ done; done | sort | uniq
 +</​code>​
tasks/github_permissions.1589554448.txt.gz ยท Last modified: 2020/05/15 14:54 by djgalloway