Skip to content

Conversation

@Hubert-Szczepanski-SAP
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Copy link
Contributor

Copilot AI left a 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 useCreateGitRepository for 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.

Copy link
Contributor

@andreaskienle andreaskienle left a 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.

@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP merged commit c2efe6d into main Nov 27, 2025
5 checks passed
@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP deleted the feat/adding-git-repository branch November 27, 2025 18:42
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.

3 participants