git flow was a mistake #11

Merged
cafkafk merged 29 commits from dev into main 2023-08-09 16:27:57 +02:00
Showing only changes of commit 9041a1626b - Show all commits

View file

@ -354,37 +354,37 @@ impl Repo {
unimplemented!("This seems to easy to missuse/exploit"); unimplemented!("This seems to easy to missuse/exploit");
// fs::remove_dir_all(format!("{}{}", &self.path.as_ref(), &self.name.as_ref())) // fs::remove_dir_all(format!("{}{}", &self.path.as_ref(), &self.name.as_ref()))
} }
fn check_is_valid_GitRepo(&self) -> bool { fn check_is_valid_gitrepo(&self) -> bool {
// pub name: String, // pub name: string,
// pub path: String, // pub path: string,
// pub url: String, // pub url: string,
todo!(); todo!();
} }
fn check_is_valid_GitHubRepo(&self) -> bool { fn check_is_valid_githubrepo(&self) -> bool {
todo!(); todo!();
} }
fn check_is_valid_GitLabRepo(&self) -> bool { fn check_is_valid_gitlabrepo(&self) -> bool {
todo!(); todo!();
} }
fn check_is_valid_GiteaRepo(&self) -> bool { fn check_is_valid_gitearepo(&self) -> bool {
todo!(); todo!();
} }
fn check_is_valid_UrlRepo(&self) -> bool { fn check_is_valid_urlrepo(&self) -> bool {
todo!(); todo!();
} }
fn check_is_valid_Link(&self) -> bool { fn check_is_valid_link(&self) -> bool {
todo!(); todo!();
} }
/// Check if Repo is a valid instance of its kind /// Check if Repo is a valid instance of its kind
pub fn is_valid_kind(&self) -> bool { pub fn is_valid_kind(&self) -> bool {
use RepoKinds::*; use RepoKinds::*;
match &self.kind { match &self.kind {
Some(GitRepo) => self.check_is_valid_GitRepo(), Some(GitRepo) => self.check_is_valid_gitrepo(),
Some(GitHubRepo) => self.check_is_valid_GitHubRepo(), Some(GitHubRepo) => self.check_is_valid_githubrepo(),
Some(GitLabRepo) => self.check_is_valid_GitLabRepo(), Some(GitLabRepo) => self.check_is_valid_gitlabrepo(),
Some(GiteaRepo) => self.check_is_valid_GiteaRepo(), Some(GiteaRepo) => self.check_is_valid_gitearepo(),
Some(UrlRepo) => self.check_is_valid_UrlRepo(), Some(UrlRepo) => self.check_is_valid_urlrepo(),
Some(Link) => self.check_is_valid_Link(), Some(Link) => self.check_is_valid_link(),
Some(kind) => { Some(kind) => {
panic!("kind {kind:?} not implemented"); panic!("kind {kind:?} not implemented");
false false