feat: New issue view command to view an issue

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-06-09 22:06:56 +00:00
parent 76b76bc8d6
commit da96985a40
5 changed files with 147 additions and 1 deletions

View File

@@ -16,10 +16,13 @@
/// `issue new` subcommand
mod new;
/// `issue view` subcommand
mod view;
use clap::Subcommand;
use self::new::NewArgs;
use self::view::ViewArgs;
use super::{CliOptions, CommandRunner};
use crate::error::N34Result;
@@ -30,10 +33,12 @@ pub const ISSUE_ALT_PREFIX: &str = "git issue: ";
pub enum IssueSubcommands {
/// Create a new repository issue
New(NewArgs),
/// View an issue by its ID
View(ViewArgs),
}
impl CommandRunner for IssueSubcommands {
async fn run(self, options: CliOptions) -> N34Result<()> {
crate::run_command!(self, options, &New)
crate::run_command!(self, options, & New View)
}
}