feat: support secondary promotion repos in git sync settings (#7173)

This commit is contained in:
Alexander Petric
2025-11-18 23:02:04 +00:00
committed by GitHub
parent 0701c4cc5e
commit cff3df6c6f
3 changed files with 76 additions and 36 deletions
@@ -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}
/>