diff --git a/cspell.json b/cspell.json index c8b5db3..7ad2c62 100644 --- a/cspell.json +++ b/cspell.json @@ -4,6 +4,8 @@ "dictionaryDefinitions": [], "dictionaries": [], "words": [ + "Acked", + "johndoe", "outro", "rczrc" ], diff --git a/src/index.ts b/src/index.ts index 868168f..c85c2d9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -145,6 +145,15 @@ program 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({ message: "Does this commit have breaking changes?", initialValue: false, @@ -178,7 +187,7 @@ program scope ? `(${scope.toString()})` : `` }${isBreaking ? "!" : ""}: ${message.toString()}${ resolvesIssue ? ` (${issue?.toString()})` : `` - }${body ? `\n\n${body}` : ``}`; + }${body ? `\n\n${body}` : ``}${footer ? `\n\n${footer}` : ``}`; if (stageAll) { await simpleGit()