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

fix rate limit, adds de-duplication of teams #26

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

amenocal
Copy link
Collaborator

This pull request includes changes to improve the handling of GitHub API rate limits and optimize the process of fetching repository teams by avoiding duplicate entries.

Rate Limit Handling:

  • internal/api/api.go: Updated the context in GetRepositoryTeams to include a value that ensures the client sleeps until the primary rate limit is reset when rate limited.

Team Synchronization Optimization:

  • pkg/sync/sync.go: Introduced a map to track added teams in SyncTeamsByRepo to avoid adding duplicate teams to the list.

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

pkg/sync/sync.go:91

  • The variable name 'target_handle' should be renamed to 'targetHandle' to follow Go naming conventions.
target_handle, err := getTargetHandle(os.Getenv("GHMT_MAPPING_FILE"), member.Login)

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

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 and Copilot

@amenocal amenocal merged commit ef75f01 into main Nov 12, 2024
1 check passed
@amenocal amenocal deleted the amenocal/fetching-issues branch November 12, 2024 17:46
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