fix: redact commander approval reasons
This commit is contained in:
@@ -44,6 +44,18 @@ function displayCommandName(parts: string[]): string {
|
||||
}
|
||||
return shown.join(" ");
|
||||
}
|
||||
if (parts[0] === "commander" && parts[1] === "approval" && parts[2] === "request") {
|
||||
const shown: string[] = [];
|
||||
for (let index = 0; index < parts.length; index += 1) {
|
||||
const part = parts[index] ?? "";
|
||||
shown.push(part);
|
||||
if (part === "--reason") {
|
||||
shown.push("<reason:redacted>");
|
||||
index += 1;
|
||||
}
|
||||
}
|
||||
return shown.join(" ");
|
||||
}
|
||||
return parts.join(" ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user