{#snippet headerActions()} {#if !isLegacy} {#if validation?.hasChanges && validation?.isValid && !repo.isUnsavedConnection} {#if idx !== null && gitSyncContext.initialRepositories[idx] && !repo.legacyImported} {/if} {/if} {/if} {#if isCollapsible} {/if} {#if !confirmingDelete}
{:else}
{/if} {/snippet} {#snippet repositoryContent()}
Resource:
{#if !emptyString(repo.git_repo_resource_path)} {/if}
{#if !repo.isUnsavedConnection && repo.git_repo_resource_path}
{#if loadingResourceInfo}
Loading resource info...
{:else if resourceInfo?.url}
Git URL: {resourceInfo.url}
{:else if resourceInfo?.error}
{resourceInfo.error}
{/if}
{/if} {#if !emptyString(repo.git_repo_resource_path)} {#if validation?.isDuplicate}
This resource is already used by another repository.
{/if} {#if gitSyncTestJob && gitSyncTestJob.status !== undefined}
{#if gitSyncTestJob.status === 'running'} {:else if gitSyncTestJob.status === 'success'} {:else} {/if} Git sync resource checked via Windmill job {gitSyncTestJob.jobId} WARNING: Only read permissions are verified.
{#if gitSyncTestJob.status === 'failure' && gitSyncTestJob.error}
Error: {gitSyncTestJob.error}
{/if} {/if} {#if repo.legacyImported} This repository was initialized from workspace-level legacy Git-Sync settings. Review the filters and press Save to migrate. {/if} {#if repo.script_path} This repository uses a pinned sync script: {repo.script_path}. Switch to auto-managed to always use the latest version bundled with Windmill.
{/if} {#if repo.isUnsavedConnection && !emptyString(repo.git_repo_resource_path) && idx !== null} {:else} {#snippet actions()} {/snippet} {#if !repo.isUnsavedConnection} {#if !emptyString(repo.git_repo_resource_path) && !repo.legacyImported}
Push to Git on deploy (Windmill → Git)
{#if !isFork || (isDevWorkspace && repoMode === 'promotion')} {/if}
{#if devPromotion && !repo.isUnsavedConnection}
setDevPromotion(e.detail)} /> {#if repo.use_individual_branch}
setGroupByFolder(e.detail)} />
{/if}
{/if} {#if repoMode === 'promotion' && isGithubApp}
setPromotionOpenPrs(e.detail)} />
{:else if repoMode === 'promotion' && !repo.isUnsavedConnection}
To open a pull request for each deploy branch, set up the open-pr-on-commit workflow in the repository. Recommended: connect the repository through the GitHub App and Windmill opens them automatically.
{/if} {#if repoMode === 'sync' && isFork}
Deploys from this workspace are pushed to the {forkBranch} branch of the shared repository, not to the tracked branch.
{:else if repoMode === 'sync' && !isFork}
These push settings also apply to forks of this workspace: an item deployed in a fork is pushed to the fork's own wm-fork/… branch instead of the tracked branch.
{#if isGithubApp}
setForkOpenPrs(e.detail)} > {#snippet right()} {#if !$enterpriseLicense}{/if} {/snippet}
{:else}
To open pull requests when an item is deployed in a fork, set up the open-pr-on-fork-commit workflow in the repository. Recommended: connect the repository through the GitHub App and Windmill opens them automatically.
{/if} {/if} {#if repo.open_pr_error}
{repo.open_pr_error} If this mentions permissions, the GitHub App installation may not have approved the pull-request permission yet.
{/if}
{#if repoMode === 'sync'}
Pull from Git (Git → Windmill)
{#if isFork}
Automatic sync from Git is managed in the parent workspace's git sync settings. When enabled there, changes to this fork's {forkBranch} branch deploy here automatically.
{#if repo.auto_pull?.last_pull_status}
{#if repo.auto_pull.last_pull_status.success} Last synced{repo.auto_pull.last_pull_status.synced_sha ? ` to ${repo.auto_pull.last_pull_status.synced_sha.slice(0, 7)}` : ''}. {:else} Last sync failed{repo.auto_pull.last_pull_status.error ? `: ${repo.auto_pull.last_pull_status.error}` : ''}. {/if}
{/if} {:else} setAutoPullEnabled(e.detail)} > {#snippet right()} {#if !$enterpriseLicense}{/if} {/snippet}
setSyncForks(e.detail)} />
{/if} {#if !isGithubApp && !loadingResourceInfo}
Pull for this repository checks the tracked branch about every minute; longer gaps make drift and merge conflicts more likely. For instant pull, connect the repository through the GitHub App (which also lets Windmill manage pull requests), or push changes into Windmill with the sync GitHub workflow. If you already push changes with a GitHub Action, keep either the Action or automatic pull, not both, so they don't fight over deploys.
{/if} {#if repo.auto_pull?.enabled} {@const viaWebhook = repo.auto_pull?.webhook_id != null} {#if isGithubApp}
If you previously set up a GitHub Action to push changes into Windmill, remove it now so the two don't fight over deploys.
{/if}
{#if repo.auto_pull?.last_pull_status} {#if repo.auto_pull.last_pull_status.success} Last synced{repo.auto_pull.last_pull_status.synced_sha ? ` to ${repo.auto_pull.last_pull_status.synced_sha.slice(0, 7)}` : ''}. {viaWebhook ? ' Syncing instantly via webhook.' : ' Checking the tracked branch about every minute.'} {:else} Last sync failed{repo.auto_pull.last_pull_status.error ? `: ${repo.auto_pull.last_pull_status.error}` : ''}. {/if} {:else} {viaWebhook ? 'Connected via webhook. New commits to the tracked branch deploy instantly.' : 'Checking the tracked branch about every minute. New commits deploy automatically.'} {/if}
{#if isGithubApp && repo.auto_pull?.webhook_error}
{repo.auto_pull.webhook_error}
{/if} {/if}
{/if} {/if} {/if} {/if} {:else}
Please select a Git repository resource.
{/if}
{/snippet} {#if shouldShowEmptyState}

{displayTitle}

{#if displayDescription}

{displayDescription} {#if mode === 'promotion'} Learn more about Git Promotion {/if}

{/if}

{#if mode === 'sync'} No Git Sync repository configured. Add one to enable direct synchronization. {:else if mode === 'promotion'} No Git Promotion repository configured. Add one to enable branch-based workflows. {:else} No repository configured. {/if}

{#if onAdd} {/if}
{:else if repo} {#if variant === 'primary-sync' || variant === 'primary-promotion'}

{displayTitle}

{@render headerActions()}
{#if displayDescription}

{displayDescription} {#if mode === 'promotion'} Learn more about Git Promotion {/if}

{/if}
{@render repositoryContent()}
{:else}
{displayTitle} {#if repo.legacyImported} Legacy Configuration {/if} {repo.git_repo_resource_path}
{@render headerActions()}
{#if !repo.collapsed}
{@render repositoryContent()}
{/if}
{/if} {/if}