Adds ratelimit handling and adds --skip-teams flag #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on enhancing the functionality of the GitHub team migration tool by introducing a feature to skip adding members and repositories to teams that already exist, in order to save on API requests. It also includes updates to dependencies and minor changes to improve the handling of API rate limits.
Addition of
skip-teams
flag:README.md
: Updated the usage instructions to include the newskip-teams
flag.cmd/sync.go
: Addedskip-teams
flag to thesyncCmd
command and set environment variables accordingly. [1] [2] [3] [4]internal/team/team.go
: Modified theCreateTeam
function to skip adding repositories and members if the team already exists andskip-teams
flag is set. [1] [2]GitHub API version update:
internal/api/api.go
: Updated the import statement to usev62
of the GitHub API instead ofv53
. Also, made changes to various functions to use context withSleepUntilPrimaryRateLimitResetWhenRateLimited
value set to true. [1] [2] [3] [4]Dependencies update:
go.mod
: Updated various dependencies to newer versions. [1] [2]