feat(mirror): push engine for GitHub and GitLab destinations (#384)

GitHub and GitLab as mirror destinations, both beta. Neither has a usable pull mirror API, so the app keeps a bare clone of each source repository and pushes its branches and tags to the target with force and prune. Target adapters create, archive and delete repositories through each host's API. A dispatcher routes mirror, sync, retry, scheduler, recovery and cleanup by destination; Gitea and Forgejo are unchanged. Migration 0018 records each repository's destination host. Metadata, LFS, wiki and force push protection are disabled with a reason for push targets.

Closes #377
This commit is contained in:
ARUNAVO RAY authored and GitHub committed 2026-09-02 18:23:27 +05:30
1 parent 8f9fc55c8e
commit 38fac54b17
55 files changed
+6385 -223

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
ALTER TABLE `repositories` ADD `destination_provider` text DEFAULT 'gitea' NOT NULL;--> statement-breakpoint
ALTER TABLE `repositories` ADD `destination_url` text DEFAULT '' NOT NULL;--> statement-breakpoint
UPDATE `repositories` SET
`destination_provider` = COALESCE((SELECT json_extract(`configs`.`gitea_config`, '$.provider') FROM `configs` WHERE `configs`.`id` = `repositories`.`config_id`), 'gitea'),
`destination_url` = COALESCE((SELECT json_extract(`configs`.`gitea_config`, '$.url') FROM `configs` WHERE `configs`.`id` = `repositories`.`config_id`), '')
WHERE `destination_url` = '';--> statement-breakpoint
UPDATE `repositories` SET `destination_provider` = 'gitea' WHERE `destination_provider` NOT IN ('gitea', 'forgejo', 'github', 'gitlab');
File diff suppressed because it is too large. Load diff
+7
View File
@@ -127,6 +127,13 @@
"when": 1788339447860,
"tag": "0017_api_keys",
"breakpoints": true
},
{
"idx": 18,
"version": "6",
"when": 1788350408052,
"tag": "0018_destination_columns",
"breakpoints": true
}
]
}