2024-07-26 06:49:09 +01:00
|
|
|
//
|
|
|
|
pub mod commit;
|
|
|
|
pub mod fetch;
|
|
|
|
pub mod file;
|
|
|
|
pub mod forge;
|
|
|
|
mod generation;
|
|
|
|
mod git_ref;
|
|
|
|
mod git_remote;
|
|
|
|
pub mod push;
|
|
|
|
mod repo_details;
|
|
|
|
pub mod repository;
|
|
|
|
mod user_notification;
|
|
|
|
pub mod validation;
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests;
|
|
|
|
|
|
|
|
pub use commit::Commit;
|
2024-08-06 07:43:28 +01:00
|
|
|
pub use forge::ForgeLike;
|
|
|
|
pub use forge::MockForgeLike;
|
2024-07-26 06:49:09 +01:00
|
|
|
pub use generation::Generation;
|
2024-08-06 07:43:28 +01:00
|
|
|
#[allow(clippy::module_name_repetitions)]
|
2024-07-26 06:49:09 +01:00
|
|
|
pub use git_ref::GitRef;
|
2024-08-06 07:43:28 +01:00
|
|
|
#[allow(clippy::module_name_repetitions)]
|
2024-07-26 06:49:09 +01:00
|
|
|
pub use git_remote::GitRemote;
|
|
|
|
pub use repo_details::RepoDetails;
|
|
|
|
pub use repository::Repository;
|
|
|
|
pub use repository::RepositoryFactory;
|
|
|
|
pub use user_notification::UserNotification;
|
|
|
|
|
|
|
|
use crate::common::branch_name;
|
|
|
|
use crate::common::repo_alias;
|
|
|
|
use crate::common::repo_path;
|
|
|
|
use crate::ForgeDetails;
|
|
|
|
use crate::GitDir;
|
|
|
|
use crate::RepoConfig;
|
|
|
|
|
2024-08-06 07:43:28 +01:00
|
|
|
#[must_use]
|
2024-07-26 06:49:09 +01:00
|
|
|
pub fn repo_details(
|
|
|
|
n: u32,
|
|
|
|
generation: Generation,
|
|
|
|
forge: ForgeDetails,
|
|
|
|
repo_config: Option<RepoConfig>,
|
|
|
|
gitdir: GitDir,
|
|
|
|
) -> RepoDetails {
|
|
|
|
RepoDetails {
|
|
|
|
generation,
|
|
|
|
repo_alias: repo_alias(n),
|
|
|
|
repo_path: repo_path(n),
|
|
|
|
gitdir,
|
|
|
|
branch: branch_name(n),
|
|
|
|
forge,
|
|
|
|
repo_config,
|
|
|
|
}
|
|
|
|
}
|