Skip to content

Commit b3633b9

Browse files
committed
admin/delete_crate: Add --message CLI option
1 parent af63782 commit b3633b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/crates-admin/delete_crate.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ pub struct Opts {
3333
/// Your GitHub username.
3434
#[arg(long)]
3535
deleted_by: String,
36+
37+
/// An optional message explaining why the crate was deleted.
38+
#[arg(long)]
39+
message: Option<String>,
3640
}
3741

3842
pub async fn run(opts: Opts) -> anyhow::Result<()> {
@@ -80,6 +84,7 @@ pub async fn run(opts: Opts) -> anyhow::Result<()> {
8084
.created_at(&created_at)
8185
.deleted_at(&now)
8286
.deleted_by(deleted_by.id)
87+
.maybe_message(opts.message.as_deref())
8388
.available_at(&now)
8489
.build();
8590

0 commit comments

Comments
 (0)