Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ratelimit handling and adds --skip-teams flag #16

Merged
merged 3 commits into from
May 14, 2024

Conversation

amenocal
Copy link
Collaborator

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 new skip-teams flag.
  • cmd/sync.go: Added skip-teams flag to the syncCmd command and set environment variables accordingly. [1] [2] [3] [4]
  • internal/team/team.go: Modified the CreateTeam function to skip adding repositories and members if the team already exists and skip-teams flag is set. [1] [2]

GitHub API version update:

  • internal/api/api.go: Updated the import statement to use v62 of the GitHub API instead of v53. Also, made changes to various functions to use context with SleepUntilPrimaryRateLimitResetWhenRateLimited value set to true. [1] [2] [3] [4]

Dependencies update:

  • go.mod: Updated various dependencies to newer versions. [1] [2]

@amenocal amenocal requested a review from antgrutta as a code owner May 14, 2024 19:05
@amenocal amenocal changed the title Adds ratelimit handgling and adds --skip-teams flag Adds ratelimit handling and adds --skip-teams flag May 14, 2024
Copy link
Collaborator

@antgrutta antgrutta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antgrutta antgrutta merged commit b4ced17 into main May 14, 2024
1 check passed
@antgrutta antgrutta deleted the amenocal/handle-ratelimits branch May 14, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants