fix(commands): have unreleased section for changelog
This commit is contained in:
10
src/index.ts
10
src/index.ts
@@ -258,13 +258,15 @@ program
|
||||
console.log("Generation of this changelog is based on commits");
|
||||
|
||||
for (const commit of commits) {
|
||||
const tag = semver.sort(
|
||||
(await simpleGit().tags([`--contains=${commit.hash}`])).all
|
||||
)[0]!;
|
||||
const tag =
|
||||
semver.sort(
|
||||
(await simpleGit().tags([`--contains=${commit.hash}`])).all
|
||||
)[0]! || "Unreleased";
|
||||
|
||||
const currentCommitStack = parsedCommitStacks.find(
|
||||
(commitStack) => commitStack.version === tag
|
||||
) || {
|
||||
version: tag || "",
|
||||
version: tag || "Unreleased",
|
||||
breaking: [],
|
||||
features: [],
|
||||
fixes: [],
|
||||
|
||||
Reference in New Issue
Block a user