Files
windmill/frontend/src/lib/components/git_sync/GitSyncModeDisplay.svelte
T
wendrul 4660303e29 fix: workspace forks shouldn't inherit promotion mode repo (#7223)
* fix: workspace forks shouldn't inherit promotion mode repo

* fix: git sync: don't default to main when talking about target branches in git
2025-11-25 17:26:05 +00:00

26 lines
834 B
Svelte

<script lang="ts">
import type { GitSyncRepository } from './GitSyncContext.svelte'
let { mode, targetBranch, repository } = $props<{
mode?: 'sync' | 'promotion' | null
targetBranch: string | undefined
repository?: GitSyncRepository | null
}>()
</script>
<div class="text-base">
{#if mode === 'promotion'}
<div
><span class="font-bold">Promotion:</span> Creating branches whose promotion target is {targetBranch? `'${targetBranch}'` :
"the repo's default branch"}</div
>
{#if repository?.group_by_folder}
<div class="text-sm text-primary mt-1">Grouped by folder</div>
{/if}
{:else if targetBranch}
<div><span class="font-bold">Sync:</span> Syncing back to branch '{targetBranch}'</div>
{:else}
<div><span class="font-bold">Sync:</span> Syncing back to the repo's default branch</div>
{/if}
</div>