Closed DerpyWasHere closed 3 months ago
Note that when generating organization invites, iirc we're restricted to 50/hr, so in some scenarios we may want to implement rate limiting on the secondary rate limit (which is described on the rate limit page above). We should be fine though as we're generating max 12 or so invites per term.
We might also want to implement functions to list current members, which will be super easy and can probably be pushed to a new issue.
I'm testing this on a test organization CSSS-Test-Organization
that I made. Albeit far from professional I've just been using a test python script.
Closes #20. (Vibes)
The REST API provided by Github has constraints detailed here. Realistically the only constraint we care about is
x-ratelimit-remaining
which I've already added a check for. We should probably further discuss how to gracefully handle this as currently I raise an exception when we hit <50 remaining API calls. As noted in #20, all of these functions are handled asynchronously, so I chose to leave a healthy margin to avoid being rate limited.I added the functionality requested, adding/removing from organizations, adding/removing from teams. This is implemented in a new
github
module.For testing I've created a new CSSS-Test-Organization, we can talk about transferring ownership of that in person/over call.
Authorization here in the
github
module is token based and administrated through the fine grained personal access token system in Github. As such we can just store it as an environment variableGITHUB_TOKEN
.