blob: 898f06994b25c4dabb4d8573d9c852bc4648514d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#![cfg_attr(not(test), warn(clippy::pedantic))]
#![cfg_attr(not(test), warn(clippy::expect_used))]
use anyhow::Result;
use clap::{Parser, Subcommand};
mod sub_commands;
#[derive(Parser)]
#[command(author, version, about, long_about = None)]
#[command(propagate_version = true)]
pub struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
/// replace with an actual subcommand
Placeholder(sub_commands::placeholder::SubCommandArgs),
Capabilities(),
// list
// - get git list from remote git server
// - suppliment list with open prs and send back
// - get prs
// - get commits against pr
// - find most recent commit against pr
}
#[tokio::main]
async fn main() -> Result<()> {
let cli = Cli::parse();
match &cli.command {
Commands::Capabilities() => sub_commands::capabilities::launch(),
Commands::Placeholder(args) => {
futures::executor::block_on(sub_commands::placeholder::launch(&cli, args))
}
}
}
|