diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2023-12-01 00:00:00 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2023-12-01 00:00:00 +0000 |
| commit | 06be0bc44011411b78217459f505ed12281b32c4 (patch) | |
| tree | 36cab80e309d33f20fedcc97258700a379aa348e /src/sub_commands/prs/mod.rs | |
| parent | 492cc67887855cecb3fb501c4b61af50bf645b73 (diff) | |
feat(prs-list) list and pull selected as branch
- fetch prs and present as a selectable list
- create and / or checkout branch for selected pr
- apply latest patches as commits
Diffstat (limited to 'src/sub_commands/prs/mod.rs')
| -rw-r--r-- | src/sub_commands/prs/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sub_commands/prs/mod.rs b/src/sub_commands/prs/mod.rs index 982e866..a41c495 100644 --- a/src/sub_commands/prs/mod.rs +++ b/src/sub_commands/prs/mod.rs | |||
| @@ -3,6 +3,7 @@ use clap::Subcommand; | |||
| 3 | 3 | ||
| 4 | use crate::Cli; | 4 | use crate::Cli; |
| 5 | pub mod create; | 5 | pub mod create; |
| 6 | pub mod list; | ||
| 6 | 7 | ||
| 7 | #[derive(clap::Parser)] | 8 | #[derive(clap::Parser)] |
| 8 | pub struct SubCommandArgs { | 9 | pub struct SubCommandArgs { |
| @@ -13,10 +14,12 @@ pub struct SubCommandArgs { | |||
| 13 | #[derive(Debug, Subcommand)] | 14 | #[derive(Debug, Subcommand)] |
| 14 | pub enum Commands { | 15 | pub enum Commands { |
| 15 | Create(create::SubCommandArgs), | 16 | Create(create::SubCommandArgs), |
| 17 | List(list::SubCommandArgs), | ||
| 16 | } | 18 | } |
| 17 | 19 | ||
| 18 | pub async fn launch(cli_args: &Cli, pr_args: &SubCommandArgs) -> Result<()> { | 20 | pub async fn launch(cli_args: &Cli, pr_args: &SubCommandArgs) -> Result<()> { |
| 19 | match &pr_args.prs_command { | 21 | match &pr_args.prs_command { |
| 20 | Commands::Create(args) => create::launch(cli_args, pr_args, args).await, | 22 | Commands::Create(args) => create::launch(cli_args, pr_args, args).await, |
| 23 | Commands::List(args) => list::launch(cli_args, pr_args, args).await, | ||
| 21 | } | 24 | } |
| 22 | } | 25 | } |