diff options
Diffstat (limited to 'src/sub_commands/prs/mod.rs')
| -rw-r--r-- | src/sub_commands/prs/mod.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/sub_commands/prs/mod.rs b/src/sub_commands/prs/mod.rs new file mode 100644 index 0000000..c316e73 --- /dev/null +++ b/src/sub_commands/prs/mod.rs | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | use anyhow::Result; | ||
| 2 | use clap::Subcommand; | ||
| 3 | |||
| 4 | use crate::Cli; | ||
| 5 | pub mod create; | ||
| 6 | |||
| 7 | #[derive(clap::Parser)] | ||
| 8 | pub struct SubCommandArgs { | ||
| 9 | #[command(subcommand)] | ||
| 10 | pub prs_command: Commands, | ||
| 11 | } | ||
| 12 | |||
| 13 | #[derive(Debug, Subcommand)] | ||
| 14 | pub enum Commands { | ||
| 15 | Create(create::SubCommandArgs), | ||
| 16 | } | ||
| 17 | |||
| 18 | pub fn launch(cli_args: &Cli, pr_args: &SubCommandArgs) -> Result<()> { | ||
| 19 | match &pr_args.prs_command { | ||
| 20 | Commands::Create(args) => create::launch(cli_args, pr_args, args), | ||
| 21 | } | ||
| 22 | } | ||