diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2023-10-01 00:00:00 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2023-10-01 00:00:00 +0100 |
| commit | 6e9245542f070c39a1975f0d53d88913c4ac667d (patch) | |
| tree | 835c1d3db05f76f437c5d8ebc5591f1796cdab60 /src/sub_commands/prs/mod.rs | |
| parent | aa48a626c08cec353d5563a8831239d2e69c9f3d (diff) | |
feat(prs-create) find commits and create events
- identify commits
- create pull request event
- create patch events
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 | } | ||