feat(commands): trim body, footer (#24)

This commit is contained in:
2024-05-19 02:49:18 +03:00
parent a576725506
commit e8160a6f33

View File

@@ -269,7 +269,8 @@ const command = new Command("commit")
// Stop clack input // Stop clack input
process.stdin.pause(); process.stdin.pause();
body = await getEditorInput( body = (
await getEditorInput(
`e.g. `e.g.
* Revert "Guard against SMTP smuggling", commit faf23f1, by restoring the setting to its default. * Revert "Guard against SMTP smuggling", commit faf23f1, by restoring the setting to its default.
* Revert "[security] SMTP smuggling: update short term fix (#2346)", commmit e931e10, by restoring the setting to its default. * Revert "[security] SMTP smuggling: update short term fix (#2346)", commmit e931e10, by restoring the setting to its default.
@@ -277,7 +278,8 @@ const command = new Command("commit")
Fixes #444 Fixes #444
`, `,
); )
).trim();
// Resume clack input // Resume clack input
process.stdin.resume(); process.stdin.resume();
@@ -296,11 +298,13 @@ Fixes #444
if (writeFooter) { if (writeFooter) {
process.stdin.pause(); process.stdin.pause();
footer = await getEditorInput( footer = (
await getEditorInput(
`e.g. `e.g.
Co-authored-by: @john Co-authored-by: @john
`, `,
); )
).trim();
process.stdin.resume(); process.stdin.resume();
} }