feat: add support for body (#1)

sample body
This commit is contained in:
2023-08-19 19:30:43 +03:00
parent ce0c01347c
commit b5ca3152c1

View File

@@ -119,6 +119,15 @@ const GetConfig = async () => {
process.exit(0); 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({ const isBreaking = await confirm({
message: "Does this commit have breaking changes?", message: "Does this commit have breaking changes?",
initialValue: false, initialValue: false,
@@ -152,7 +161,7 @@ const GetConfig = async () => {
scope ? `(${scope.toString()})` : `` scope ? `(${scope.toString()})` : ``
}${isBreaking ? "!" : ""}: ${message.toString()}${ }${isBreaking ? "!" : ""}: ${message.toString()}${
resolvesIssue ? ` (${issue?.toString()})` : `` resolvesIssue ? ` (${issue?.toString()})` : ``
}`; }${body ? `\n\n${body}` : ``}`;
if (stageAll) { if (stageAll) {
await simpleGit().add(".").commit(commitMessage); await simpleGit().add(".").commit(commitMessage);