-
Notifications
You must be signed in to change notification settings - Fork 3
feat: adding git repo #374
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to create Flux CD Git repositories through a new dialog interface. The implementation includes a custom React hook for API interactions, a form dialog component with validation, and comprehensive test coverage for both the hook and UI component.
Key Changes:
- New custom hook
useCreateGitRepositoryfor handling Git repository creation via Kubernetes API - React dialog component with form validation for repository configuration (name, URL, branch, interval, secretRef)
- Integration of create button and dialog into the existing GitRepositories list view
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib/api/types/flux/createGitRepository.ts |
Type definitions for Flux GitRepository resource and API endpoint configuration |
src/hooks/useCreateGitRepository.ts |
Custom hook implementing repository creation logic with loading state and error handling |
src/hooks/useCreateGitRepository.spec.ts |
Comprehensive unit tests covering creation scenarios, namespace handling, and error cases |
src/components/Dialogs/CreateGitRepositoryDialog.tsx |
Form dialog component with validation for repository metadata and spec fields |
src/components/Dialogs/CreateGitRepositoryDialog.module.css |
Styling for the dialog form layout |
src/components/Dialogs/CreateGitRepositoryDialog.cy.tsx |
Cypress component tests verifying form behavior and validation |
src/components/ControlPlane/GitRepositories.tsx |
Integration of create button and dialog into the repositories list view |
public/locales/en.json |
Localization strings for dialog labels and messages |
package-lock.json |
Dependency lock file updates (version pinning and peer dependency reorganization) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall very nice, works like a charm! 🦄🙌 👍🏻 And I really appreciate that you took the time and added all those tests!
I added some remarks directly in the code below.
…cp-project/ui-frontend into feat/adding-git-repository
…cp-project/ui-frontend into feat/adding-git-repository
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: