mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-13 15:06:44 +03:00
Docs updated | added some options
This commit is contained in:
@@ -59,6 +59,7 @@ export function ConfigTabs() {
|
||||
},
|
||||
mirrorOptions: {
|
||||
mirrorReleases: false,
|
||||
mirrorLFS: false,
|
||||
mirrorMetadata: false,
|
||||
metadataComponents: {
|
||||
issues: false,
|
||||
@@ -470,10 +471,14 @@ export function ConfigTabs() {
|
||||
response.giteaConfig || config.giteaConfig,
|
||||
scheduleConfig:
|
||||
response.scheduleConfig || config.scheduleConfig,
|
||||
cleanupConfig:
|
||||
response.cleanupConfig || config.cleanupConfig,
|
||||
mirrorOptions:
|
||||
response.mirrorOptions || config.mirrorOptions,
|
||||
cleanupConfig: {
|
||||
...config.cleanupConfig,
|
||||
...response.cleanupConfig, // Merge to preserve all fields
|
||||
},
|
||||
mirrorOptions: {
|
||||
...config.mirrorOptions,
|
||||
...response.mirrorOptions, // Merge to preserve all fields including new mirrorLFS
|
||||
},
|
||||
advancedOptions:
|
||||
response.advancedOptions || config.advancedOptions,
|
||||
});
|
||||
|
||||
@@ -97,6 +97,32 @@ export function MirrorOptionsForm({
|
||||
</Tooltip>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center">
|
||||
<Checkbox
|
||||
id="mirror-lfs"
|
||||
checked={config.mirrorLFS}
|
||||
onCheckedChange={(checked) =>
|
||||
handleChange("mirrorLFS", Boolean(checked))
|
||||
}
|
||||
/>
|
||||
<label
|
||||
htmlFor="mirror-lfs"
|
||||
className="ml-2 text-sm select-none flex items-center"
|
||||
>
|
||||
Mirror LFS (Large File Storage)
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span className="ml-1 cursor-pointer text-muted-foreground">
|
||||
<Info size={14} />
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right" className="max-w-xs text-xs">
|
||||
Mirror Git LFS objects. Requires LFS to be enabled on your Gitea server and Git v2.1.2+
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center">
|
||||
<Checkbox
|
||||
|
||||
@@ -418,6 +418,7 @@ export const mirrorGithubRepoToGitea = async ({
|
||||
repo_name: repository.name,
|
||||
mirror: true,
|
||||
wiki: config.giteaConfig?.wiki || false, // will mirror wiki if it exists
|
||||
lfs: config.giteaConfig?.lfs || false, // Enable LFS mirroring if configured
|
||||
private: repository.isPrivate,
|
||||
repo_owner: repoOwner,
|
||||
description: "",
|
||||
@@ -711,6 +712,7 @@ export async function mirrorGitHubRepoToGiteaOrg({
|
||||
repo_name: repository.name,
|
||||
mirror: true,
|
||||
wiki: config.giteaConfig?.wiki || false, // will mirror wiki if it exists
|
||||
lfs: config.giteaConfig?.lfs || false, // Enable LFS mirroring if configured
|
||||
private: repository.isPrivate,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ export function mapUiToDbConfig(
|
||||
|
||||
// Mirror interval and options
|
||||
mirrorInterval: "8h", // Default value, could be made configurable
|
||||
lfs: false, // Not in UI yet
|
||||
lfs: mirrorOptions.mirrorLFS || false, // LFS mirroring option
|
||||
wiki: mirrorOptions.mirrorMetadata && mirrorOptions.metadataComponents.wiki,
|
||||
|
||||
// Visibility settings
|
||||
@@ -132,6 +132,7 @@ export function mapDbToUiConfig(dbConfig: any): {
|
||||
// Map mirror options from various database fields
|
||||
const mirrorOptions: MirrorOptions = {
|
||||
mirrorReleases: dbConfig.giteaConfig?.mirrorReleases || false,
|
||||
mirrorLFS: dbConfig.giteaConfig?.lfs || false,
|
||||
mirrorMetadata: dbConfig.giteaConfig?.mirrorMetadata || false,
|
||||
metadataComponents: {
|
||||
issues: dbConfig.giteaConfig?.mirrorIssues || false,
|
||||
|
||||
@@ -38,6 +38,7 @@ export interface GitHubConfig {
|
||||
|
||||
export interface MirrorOptions {
|
||||
mirrorReleases: boolean;
|
||||
mirrorLFS: boolean; // Mirror Git LFS objects
|
||||
mirrorMetadata: boolean;
|
||||
metadataComponents: {
|
||||
issues: boolean;
|
||||
|
||||
Reference in New Issue
Block a user