cli/issue: Move definition of "about" to args
This commit is contained in:
parent
c7bff28452
commit
f1c7c98607
|
|
@ -30,7 +30,7 @@ use crate::terminal::format::Author;
|
||||||
use crate::terminal::issue::Format;
|
use crate::terminal::issue::Format;
|
||||||
use crate::terminal::Element;
|
use crate::terminal::Element;
|
||||||
|
|
||||||
pub const ABOUT: &str = "Manage issues";
|
pub(crate) const ABOUT: &str = "Manage issues";
|
||||||
|
|
||||||
pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
||||||
let profile = ctx.profile()?;
|
let profile = ctx.profile()?;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ pub enum Assigned {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(disable_version_flag = true)]
|
#[command(about = super::ABOUT, disable_version_flag = true)]
|
||||||
pub struct Args {
|
pub struct Args {
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
pub(crate) command: Option<Command>,
|
pub(crate) command: Option<Command>,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ struct CliArgs {
|
||||||
|
|
||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
enum Commands {
|
enum Commands {
|
||||||
#[command(about = radicle_cli::commands::issue::ABOUT)]
|
|
||||||
Issue(issue::Args),
|
Issue(issue::Args),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue