Skip to content

Instantly share code, notes, and snippets.

@jhunt
Created December 2, 2017 03:13
Show Gist options
  • Save jhunt/3baa39e58fcc8d1bbfc4ddfaf1c7e764 to your computer and use it in GitHub Desktop.
Save jhunt/3baa39e58fcc8d1bbfc4ddfaf1c7e764 to your computer and use it in GitHub Desktop.
#!/bin/bash
GITHUB_USER=jhunt
ORG=bolo
ORGUSERS=$(curl -sLk -u ${GITHUB_USER}:${GITHUB_TOKEN} https://api.github.com/orgs/$ORG/members | jq --raw-output '.[] | .login')
(echo "LOGIN|NAME"
for USER in $ORGUSERS
do
NAME=$(curl -sLk -u ${GITHUB_USER}:${GITHUB_TOKEN} https://api.github.com/users/${USER} | jq --raw-output '.name')
echo "${USER}|${NAME}"
done) | column -t -s '|'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment