mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-27 16:02:43 +00:00
feat: support secondary promotion repos in git sync settings (#7173)
This commit is contained in:
@@ -94,10 +94,19 @@
|
||||
: isLegacy
|
||||
? 'Legacy promotion repository'
|
||||
: isSecondary
|
||||
? 'Secondary sync repository'
|
||||
? repo?.use_individual_branch
|
||||
? 'Secondary promotion repository'
|
||||
: 'Secondary sync repository'
|
||||
: `Repository #${(idx ?? 0) + 1}`
|
||||
)
|
||||
|
||||
// Determine the actual mode based on repository configuration
|
||||
const repoMode = $derived<'sync' | 'promotion'>(
|
||||
variant === 'primary-promotion' || variant === 'legacy' || repo?.use_individual_branch
|
||||
? 'promotion'
|
||||
: 'sync'
|
||||
)
|
||||
|
||||
// Determine display description based on variant and mode
|
||||
const displayDescription = $derived(
|
||||
variant === 'primary-sync' || variant === 'primary-promotion'
|
||||
@@ -353,7 +362,7 @@
|
||||
{#if repo.isUnsavedConnection && !emptyString(repo.git_repo_resource_path) && idx !== null}
|
||||
<DetectionFlow
|
||||
{idx}
|
||||
mode={variant === 'primary-promotion' || variant === 'legacy' ? 'promotion' : 'sync'}
|
||||
mode={repoMode}
|
||||
/>
|
||||
{:else}
|
||||
<GitSyncFilterSettings
|
||||
@@ -380,9 +389,7 @@
|
||||
<!-- Display mode settings as prominent text -->
|
||||
<div class="flex-1 mr-4">
|
||||
<GitSyncModeDisplay
|
||||
mode={variant === 'primary-promotion' || variant === 'legacy'
|
||||
? 'promotion'
|
||||
: 'sync'}
|
||||
mode={repoMode}
|
||||
{targetBranch}
|
||||
repository={repo}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user