diff options
Diffstat (limited to 'nostr_git_remote_helper/src/main.rs')
| -rw-r--r-- | nostr_git_remote_helper/src/main.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/nostr_git_remote_helper/src/main.rs b/nostr_git_remote_helper/src/main.rs deleted file mode 100644 index 849396c..0000000 --- a/nostr_git_remote_helper/src/main.rs +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | #![cfg_attr(not(test), warn(clippy::pedantic))] | ||
| 2 | #![cfg_attr(not(test), warn(clippy::expect_used))] | ||
| 3 | |||
| 4 | use anyhow::Result; | ||
| 5 | use clap::{Parser, Subcommand}; | ||
| 6 | |||
| 7 | mod sub_commands; | ||
| 8 | |||
| 9 | #[derive(Parser)] | ||
| 10 | #[command(author, version, about, long_about = None)] | ||
| 11 | #[command(propagate_version = true)] | ||
| 12 | pub struct Cli { | ||
| 13 | #[command(subcommand)] | ||
| 14 | command: Commands, | ||
| 15 | } | ||
| 16 | |||
| 17 | #[derive(Subcommand)] | ||
| 18 | enum Commands { | ||
| 19 | /// replace with an actual subcommand | ||
| 20 | Placeholder(sub_commands::placeholder::SubCommandArgs), | ||
| 21 | Capabilities(), | ||
| 22 | // list | ||
| 23 | // - get git list from remote git server | ||
| 24 | // - suppliment list with open prs and send back | ||
| 25 | // - get prs | ||
| 26 | // - get commits against pr | ||
| 27 | // - find most recent commit against pr | ||
| 28 | } | ||
| 29 | |||
| 30 | #[tokio::main] | ||
| 31 | async fn main() -> Result<()> { | ||
| 32 | let cli = Cli::parse(); | ||
| 33 | match &cli.command { | ||
| 34 | Commands::Capabilities() => sub_commands::capabilities::launch(), | ||
| 35 | Commands::Placeholder(args) => { | ||
| 36 | sub_commands::placeholder::launch(&cli, args).await | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||