use clap::Subcommand;
use crate::{commands::utils::lib::UtilsSubCommand, errors::GeneralError};
#[derive(Subcommand, Debug, Clone)]
pub(crate) enum ShortcutsSubcommand {
#[cfg(feature = "git-mover")]
SyncGit,
}
impl ShortcutsSubcommand {
pub fn run(&self) -> Result<(), GeneralError> {
match self {
#[cfg(feature = "git-mover")]
ShortcutsSubcommand::SyncGit => {
use git_mover::PlatformType;
let git_mover_inst = git_mover::GitMoverCli {
source: Some(PlatformType::Github),
destination: Some(PlatformType::Codeberg),
manual: true,
..Default::default()
};
UtilsSubCommand::git_mover(git_mover_inst)
}
}
}
}