https://github.com/karl-zylinski/patreon-github-invite
Odin program that reads Patreon members and invites them to GitHub organization
https://github.com/karl-zylinski/patreon-github-invite
automation github odin-lang patreon
Last synced: 7 months ago
JSON representation
Odin program that reads Patreon members and invites them to GitHub organization
- Host: GitHub
- URL: https://github.com/karl-zylinski/patreon-github-invite
- Owner: karl-zylinski
- License: other
- Created: 2024-04-26T22:01:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-30T15:10:35.000Z (about 1 year ago)
- Last Synced: 2025-03-28T17:08:36.239Z (7 months ago)
- Topics: automation, github, odin-lang, patreon
- Language: Odin
- Homepage:
- Size: 2.45 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a small program that uses Patreon API to list all the members of a Patreon. It then takes those members and invites them to a GitHub organization using the GitHub API. My Patreon page uses this: https://www.patreon.com/karl_zylinski
It saves a list as a file of emails it has previously invited, so it does not do it twice (spamming GitHub with requests to invite people already invited can get you rate-limited).
It checks against the ID of two of my Patreon tiers (hard coded), see "SourceCodeTier" and "SuperTier" in the code, i.e. the lowest tier does not have source access.
My Patreon campaign ID is hard coded (see first line of get_all_emails_that_should_have_access)
Also the organization name and the User-Agent of the GitHub invite API is hard coded.
If you alter those hard coded things then you can probably use this for your own needs.
Your patreon and github API secrets go into patreon_secret.txt and github_secret.txt respectively.
I run this program as a cron job every 10 minutes on an Amazon EC2 Ubuntu Server, so it should take maximum 10 minutes for new patrons to get access.
NOTE: Currently the Patreon code does not do pagination (it will get the first 1000 members, but wont see members past this limit). I will fix this if my Patreon ever gets close to this number.