Give repos a namespace to allow subdirectories

This commit is contained in:
2022-05-26 16:30:32 +02:00
parent f2d2482476
commit b8c552fb62
7 changed files with 92 additions and 36 deletions

View File

@@ -39,12 +39,12 @@ impl Project for GitlabProject {
self.name.clone()
}
fn namespace(&self) -> String {
self.path_with_namespace
.rsplit_once('/')
.expect("Gitlab project name did not include a namespace")
.0
.to_string()
fn namespace(&self) -> Option<String> {
if let Some((namespace, _name)) = self.path_with_namespace.rsplit_once('/') {
Some(namespace.to_string())
} else {
None
}
}
fn ssh_url(&self) -> String {