All.invite gh contributors.how to guide
Inviting GitHub Collaborators from Google Sheets#
Prerequisites#
-
GitHub personal‑access token (PAT) with the classic
reposcope, or a fine‑grained token granting Repository administration for the target repository.export GH_PAT=github_pat_... -
Google service‑account JSON key
- Create a service account in Google Cloud.
- Enable the Drive API on that project.
- Download the key as JSON and place it at
/app/DATA605/google_secret.json(or change the path in the script). - Share the spreadsheet with the service‑account address.
Running the script#
dev_scripts_helpers/github/invite_gh_contributors.py \
--drive_url "https://docs.google.com/spreadsheets/d/..." \ # or --csv_file </path/to/users.csv>
--gh_token "$GH_PAT" \
--org_name causify-ai \
--repo_name tutorials \
--log_level 20 # INFO
--drive_url/--csv_file: full URL of the Google Sheet containing a column namedGitHub user.--gh_token: your PAT (or setGH_PATand pass--gh_token "$GH_PAT").--org_name/--repo_name: where the invitations will be sent.- Increase
--log_levelto10for verbose debug logs.