feat: Git Configure Edit modal #806
Open
dennisvankekem wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an “Edit/Configure Git” experience in the console by fetching current Git settings, conditionally pre-populating the modal, and exposing copy-to-clipboard affordances.
Changes:
- Add a new RTK Query endpoint/hook to GET current Git settings (
/v2/git) and extend Git-related types. - Update the Git settings modal to load existing configuration, show an internal-repo URL block, and add copy buttons.
- Rename the Settings tile from “Git” to “GitOps” and hide the
otomi.gitsection in the generic settings form UI schema.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/redux/otomiApi.ts | Adds getGitSettings endpoint/hook and expands Git settings typings. |
| src/pages/SettingsOverview.tsx | Renames the settings card label from “Git” to “GitOps”. |
| src/components/Setting.tsx | Hides otomi.git in the settings form UI schema. |
| src/components/modals/ConfigureGitModal.tsx | Fetches current Git settings, pre-fills the form, adds copy-to-clipboard UI, and adjusts modal flow. |
| src/components/InformationBanner.tsx | Tweaks spacing between the info icon and message text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+270
to
+276
| const getGitFormValues = (): GitSettingsFormValues => ({ | ||
| repoUrl: hasGitConfiguration ? gitSettings?.repoUrl || '' : '', | ||
| branch: hasGitConfiguration ? gitSettings?.branch || '' : '', | ||
| username: hasGitConfiguration ? gitSettings?.username || '' : '', | ||
| password: hasGitConfiguration ? gitSettings?.password || '' : '', | ||
| email: hasGitConfiguration ? gitSettings?.email || '' : '', | ||
| }) |
Comment on lines
+4869
to
+4875
| export type GetGitSettingsApiResponse = /** status 200 Current Git settings */ { | ||
| repoUrl: string | ||
| username?: string | ||
| password: string | ||
| email: string | ||
| branch: string | ||
| } |
Comment on lines
4260
to
+4265
| git?: { | ||
| repoUrl?: string | ||
| branch?: string | ||
| username?: string | ||
| password?: string | ||
| email?: string |
Comment on lines
+450
to
+454
| <Tooltip title='Copy Git repository URL'> | ||
| <IconButton color='primary' onClick={handleCopyDefaultGitUrl}> | ||
| <ContentCopyIcon fontSize='small' /> | ||
| </IconButton> | ||
| </Tooltip> |
Comment on lines
+522
to
+529
| <Tooltip title='Copy Git repository URL'> | ||
| <IconButton | ||
| edge='end' | ||
| sx={{ mr: '0px' }} | ||
| color='primary' | ||
| onClick={handleCopyRepoUrl} | ||
| > | ||
| <ContentCopyIcon fontSize='small' /> |
Comment on lines
+265
to
+268
| const defaultGitUrl = gitSettings?.repoUrl || '' | ||
| const isDefaultGitConfiguration = gitSettings?.repoUrl?.includes('gitea-http.gitea.svc.cluster.local') ?? false | ||
| const hasGitConfiguration = !!gitSettings?.repoUrl && !isDefaultGitConfiguration | ||
| const displayedRepoUrl = isDefaultGitConfiguration ? `https://git.${domainSuffix}/otomi/values` : '' |
| Configuring an external Git Repo is recommended for installing App Platform. | ||
| </BodyText> | ||
|
|
||
| {!!defaultGitUrl && ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
console: #806
api: linode/apl-api#1017
Considerations