feat(commands): add ability to write a footer
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
"dictionaryDefinitions": [],
|
"dictionaryDefinitions": [],
|
||||||
"dictionaries": [],
|
"dictionaries": [],
|
||||||
"words": [
|
"words": [
|
||||||
|
"Acked",
|
||||||
|
"johndoe",
|
||||||
"outro",
|
"outro",
|
||||||
"rczrc"
|
"rczrc"
|
||||||
],
|
],
|
||||||
|
|||||||
11
src/index.ts
11
src/index.ts
@@ -145,6 +145,15 @@ program
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const footer = await text({
|
||||||
|
message: `Insert commit footer, can be left empty, e.g. Acked-by: @johndoe`,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isCancel(footer)) {
|
||||||
|
cancel("Commit creation cancelled");
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
const isBreaking = await confirm({
|
const isBreaking = await confirm({
|
||||||
message: "Does this commit have breaking changes?",
|
message: "Does this commit have breaking changes?",
|
||||||
initialValue: false,
|
initialValue: false,
|
||||||
@@ -178,7 +187,7 @@ program
|
|||||||
scope ? `(${scope.toString()})` : ``
|
scope ? `(${scope.toString()})` : ``
|
||||||
}${isBreaking ? "!" : ""}: ${message.toString()}${
|
}${isBreaking ? "!" : ""}: ${message.toString()}${
|
||||||
resolvesIssue ? ` (${issue?.toString()})` : ``
|
resolvesIssue ? ` (${issue?.toString()})` : ``
|
||||||
}${body ? `\n\n${body}` : ``}`;
|
}${body ? `\n\n${body}` : ``}${footer ? `\n\n${footer}` : ``}`;
|
||||||
|
|
||||||
if (stageAll) {
|
if (stageAll) {
|
||||||
await simpleGit()
|
await simpleGit()
|
||||||
|
|||||||
Reference in New Issue
Block a user