diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-14 08:41:02 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-14 08:47:27 +0000 |
| commit | c0847f928c32adb0b4dfc3b73ee77fa3cdb5ec21 (patch) | |
| tree | 07d89b9a5cb6770b25c22d35a13579df1278db0b /src/sub_commands/prs/mod.rs | |
| parent | 1022344a0529b5f6b50f35d3030a528a1a5c6f91 (diff) | |
feat!: move `prs create`>`send`, `prs list`>`list`
remove unnecessary hierachy of `prs` which is also a troublesome term
replace the concept of `create` which aligns more to the PR github model
to `send` which aligns more with the git patch model
Diffstat (limited to 'src/sub_commands/prs/mod.rs')
| -rw-r--r-- | src/sub_commands/prs/mod.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/sub_commands/prs/mod.rs b/src/sub_commands/prs/mod.rs deleted file mode 100644 index a41c495..0000000 --- a/src/sub_commands/prs/mod.rs +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | use anyhow::Result; | ||
| 2 | use clap::Subcommand; | ||
| 3 | |||
| 4 | use crate::Cli; | ||
| 5 | pub mod create; | ||
| 6 | pub mod list; | ||
| 7 | |||
| 8 | #[derive(clap::Parser)] | ||
| 9 | pub struct SubCommandArgs { | ||
| 10 | #[command(subcommand)] | ||
| 11 | pub prs_command: Commands, | ||
| 12 | } | ||
| 13 | |||
| 14 | #[derive(Debug, Subcommand)] | ||
| 15 | pub enum Commands { | ||
| 16 | Create(create::SubCommandArgs), | ||
| 17 | List(list::SubCommandArgs), | ||
| 18 | } | ||
| 19 | |||
| 20 | pub async fn launch(cli_args: &Cli, pr_args: &SubCommandArgs) -> Result<()> { | ||
| 21 | match &pr_args.prs_command { | ||
| 22 | Commands::Create(args) => create::launch(cli_args, pr_args, args).await, | ||
| 23 | Commands::List(args) => list::launch(cli_args, pr_args, args).await, | ||
| 24 | } | ||
| 25 | } | ||