Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to scan for repos where a user has collab access #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brianhlin
Copy link
Member

blin@blin-latitude:~$ ./check-collab.sh opensciencegrid brianhlin > brianhlin.github.repos 
blin@blin-latitude:~$ head brianhlin.github.repos 
brianhlin is a collaborator on the following repositories:
- opensciencegrid/xrootd-lcmaps
- opensciencegrid/xrootd-hdfs
- opensciencegrid/xrootd-cmstfc
- opensciencegrid/goctx
- opensciencegrid/BLAH
- opensciencegrid/OSG-Measurements-Metrics
- opensciencegrid/Software-Redhat
- opensciencegrid/osg-build
- opensciencegrid/osg-info-services

# TODO: figure out a way to find the last page containing repos
for i in $(seq 5); do
repos+=$(curl --stderr /dev/null \
-H "Authorization: token $(cat ~/.github/oauth2)" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should check up front if this file exists and bail if it does not.

Also check out the -K argument to curl to read options from a file (or stdin), which would avoid exposing your token in the output of ps.

@brianhlin
Copy link
Member Author

Ya know, I kinda suspect that removing someone from the org removes their access rights to org repos so we may not need even need this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants