CathySoMcK / github_batch_organisation_invite

Enable you to invite a number of users to your organisation using a file containing the emails of each user to be invited, one per line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github_batch_organisation_invite

Enable you to invite several users to your organisation using a file containing the emails of each user to be invited, one per line. Rate limit is 500 per day or 50 if you do not meet certain requirements. For more informations see: https://docs.github.com/en/free-pro-team@latest/rest/reference/orgs#set-organization-membership-for-a-user

Another option, if using GitHub Classroom, is where you invite using an assignment link or add multiple users at once through the rooster creation. With the assignment you can automatically create associated repositories and create teams if you want. See: https://classroom.github.com/help/creating-an-individual-assignment https://classroom.github.com/help/create-group-assignments and https://classroom.github.com/help/import-roster-from-lms

To run this script, you will need:

Command line format (where python is available and is version 3.x):

python github_batchadd.py -o <your_organistionname> -u <github_username> -t <github_personal_token> -f <list_of_emails_input_file>

Example, where the list of emails to invite to the organisation is in a text file called emails.txt (one email per line), and I have used my username and organsiation (and a pretend personal OAuth token):

python github_batchadd.py -o BredaUniversity -u RobbyJ -t PREtendTOKENcode -f emails.txt

About

Enable you to invite a number of users to your organisation using a file containing the emails of each user to be invited, one per line.


Languages

Language:Python 100.0%