feat(providers): pull mirrors on Gitea and tea/gh token fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-11-16 16:54:07 +01:00
1 parent 251bfe3685
commit e2631e7ab7
6 files changed
+337 -7

No files matched your search

+10 -1
View File
@@ -1,5 +1,7 @@
use crate::http::Http;
use crate::{Capabilities, Error, MirrorSpec, NewRepo, Provider, RemoteRepo, Result};
use crate::{
Capabilities, Error, MirrorSpec, NewRepo, Provider, PullMirrorSpec, RemoteRepo, Result,
};
use grove_core::config::ProviderKind;
use serde_json::{Value, json};
@@ -39,6 +41,7 @@ impl Provider for GitHub {
fn capabilities(&self) -> Capabilities {
Capabilities {
push_mirror: false,
pull_mirror: false,
orgs: true,
}
}
@@ -84,4 +87,10 @@ impl Provider for GitHub {
"GitHub has no push mirrors; use a Gitea pull mirror or the daemon's branch push",
))
}
fn create_pull_mirror(&self, _: &PullMirrorSpec) -> Result<RemoteRepo> {
Err(Error::Unsupported(
"GitHub cannot pull-mirror another forge",
))
}
}