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

feat: migrate teams based on repo list #22

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Conversation

amenocal
Copy link
Collaborator

This pull request introduces a new command to migrate teams by repository. The primary changes involve adding a new sub command, improving error messages, and adding functions to handle repository and team data.

New Command and Features:

  • New byRepos Command: Added a new command byRepos to migrate teams based on a repository list. This command sets environment variables, binds them using Viper, and calls the SyncTeamsByRepo function. (cmd/byRepos.go)

Enhancements and New Functions:

  • Parse Repository File: Introduced ParseRepositoryFile function to read and parse a file containing repository URLs and format them to owner/repo format. (internal/repository/repository.go)
  • Get Repository Teams: Added GetRepositoryTeams function to fetch teams associated with a repository. (internal/api/api.go, internal/team/team.go) [1] [2]

Error Handling Improvements:

  • Enhanced Error Messages: Improved error messages in CreateTeam function to provide more context when a team is not found or already exists. (internal/api/api.go) [1] [2]

Import Adjustments:

  • Import Statements: Updated import statements to include necessary packages for new functionalities. (internal/repository/repository.go, pkg/sync/sync.go) [1] [2]

These changes collectively enhance the functionality of the migration tool by enabling team migrations based on repository lists, improving error handling, and adding necessary support functions.

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.

Awesome stuff, looks good to me!
🚢

@amenocal amenocal merged commit c17b910 into main Sep 11, 2024
2 checks passed
@amenocal amenocal deleted the amenocal/from-repo-list branch September 11, 2024 15:52
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