From b5ca3152c1a2dd605e2e355d2d9954179c5d6860 Mon Sep 17 00:00:00 2001 From: Olivers Vitins Date: Sat, 19 Aug 2023 19:30:43 +0300 Subject: [PATCH] feat: add support for body (#1) sample body --- src/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ea4d124..725094f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,6 +119,15 @@ const GetConfig = async () => { process.exit(0); } + const body = await text({ + message: `Briefly describe made changes in imperative tense, recommended length 100, can be left empty`, + }); + + if (isCancel(body)) { + cancel("Commit creation cancelled"); + process.exit(0); + } + const isBreaking = await confirm({ message: "Does this commit have breaking changes?", initialValue: false, @@ -152,7 +161,7 @@ const GetConfig = async () => { scope ? `(${scope.toString()})` : `` }${isBreaking ? "!" : ""}: ${message.toString()}${ resolvesIssue ? ` (${issue?.toString()})` : `` - }`; + }${body ? `\n\n${body}` : ``}`; if (stageAll) { await simpleGit().add(".").commit(commitMessage);