Skip to content

Commit

Permalink
admin/delete_crate: Add --message CLI option
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Nov 12, 2024
1 parent 391b0b7 commit f0d0afd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bin/crates-admin/delete_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ pub struct Opts {
/// Your GitHub username.
#[arg(long)]
deleted_by: Option<String>,

/// An optional message explaining why the crate was deleted.
#[arg(long)]
message: Option<String>,
}

pub async fn run(opts: Opts) -> anyhow::Result<()> {
Expand Down Expand Up @@ -80,6 +84,7 @@ pub async fn run(opts: Opts) -> anyhow::Result<()> {
.created_at(&created_at)
.deleted_at(&now)
.maybe_deleted_by(deleted_by)
.maybe_message(opts.message.as_deref())
.available_at(&now)
.build();

Expand Down

0 comments on commit f0d0afd

Please sign in to comment.