Skip to content

Commit

Permalink
fix: change log
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Torres committed Jun 8, 2022
1 parent f9f9a19 commit 28b6150
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions analyze.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,22 @@ const REQUIRED_ENV = ["PACKAGE", "DIRECTORY", "GITURL"];
const nextVersion =
(nextReleaseType && bump(lastTag, nextReleaseType)) || "-";
const nextTag = (nextReleaseType && `${PACKAGE}-v${nextVersion}`) || "-";
const today = new Date().toISOString().slice(0, 10);
const changeLog =
(nextReleaseType &&
`## [${new Date()
.toISOString()
.slice(0, 10)}](${GITURL}/compare/${lastTag}...${nextTag})\n`.concat(
`#### ${today} [+/-](${GITURL}/compare/${lastTag}...${nextTag}) ${nextTag}\n`.concat(
Object.keys(changes)
.filter((key) => changes[key].length)
.map((key) =>
`### ${key.toUpperCase()}\n`.concat(
changes[key]
.map(
({ sha, message }) =>
`* [${sha.slice(0, 8)}](${GITURL}/commit/${sha}) ${message}`
)
.join("\n")
)
changes[key]
.map(
({ sha, message }) =>
` - ${key.toUpperCase()} [${sha.slice(
0,
8
)}](${GITURL}/commit/${sha}) ${message}`
)
.join("\n")
)
.join("\n")
)) ||
Expand Down

0 comments on commit 28b6150

Please sign in to comment.