mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 15:26:09 +00:00
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:
1 parent
251bfe3685
commit
e2631e7ab7
6 files changed
+337
-7
No files matched your search
@@ -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",
|
||||
))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user