fc-common: add declarative sync for remote builders and channels

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3dae89f04777f6d941824606aebe34446a6a6964
This commit is contained in:
raf 2026-02-08 21:16:32 +03:00
commit d4d9297d96
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 455 additions and 27 deletions

View file

@ -33,7 +33,7 @@ static SYSTEM_RE: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"^\w+-\w+$").unwrap());
const VALID_REPO_PREFIXES: &[&str] =
&["https://", "http://", "git://", "ssh://"];
&["https://", "http://", "git://", "ssh://", "file://"];
const VALID_FORGE_TYPES: &[&str] = &["github", "gitea", "forgejo", "gitlab"];
/// Trait for validating request DTOs before persisting.
@ -62,7 +62,7 @@ fn validate_repository_url(url: &str) -> Result<(), String> {
}
if !VALID_REPO_PREFIXES.iter().any(|p| url.starts_with(p)) {
return Err(
"repository_url must start with https://, http://, git://, or ssh://"
"repository_url must start with https://, http://, git://, ssh://, or file://"
.to_string(),
);
}