chore: remove unused trello boards list command
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 2m10s
Test / build (map[name:stable]) (push) Successful in 2m1s
Release Please / Release-plz (push) Failing after 19s

This commit is contained in:
Paul Campbell 2024-12-14 17:27:44 +00:00
parent ae9fff4249
commit 959613919e
2 changed files with 0 additions and 35 deletions

View file

@ -1,34 +0,0 @@
//
use clap::Parser;
use crate::{execute::Execute, p, FullCtx};
#[derive(Parser, Debug)]
pub(crate) enum TrelloBoardCommand {
List {
#[clap(long, action = clap::ArgAction::SetTrue)]
dump: bool,
},
}
impl Execute for TrelloBoardCommand {
async fn execute(self, ctx: FullCtx) -> color_eyre::Result<()> {
match self {
Self::List { dump } => list(ctx, dump).await,
}
}
}
pub(crate) async fn list(ctx: FullCtx, dump: bool) -> color_eyre::Result<()> {
let api_result = ctx.trello_client().boards().await;
if dump {
p!(ctx.prt, "{}", api_result.text);
} else {
let mut boards = api_result.result?;
boards.sort_by(|a, b| a.name.cmp(&b.name));
boards.into_iter().for_each(|board| {
p!(ctx.prt, "{}:{}", board.id, board.name);
});
}
Ok(())
}

View file

@ -20,7 +20,6 @@ use crate::{
pub(crate) mod attachment; pub(crate) mod attachment;
pub(crate) mod board; pub(crate) mod board;
pub(crate) mod boards;
pub(crate) mod card; pub(crate) mod card;
pub(crate) mod client; pub(crate) mod client;
pub(crate) mod member; pub(crate) mod member;