changelog-machine 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core/markdown.js +10 -3
- package/package.json +1 -1
package/lib/core/markdown.js
CHANGED
|
@@ -28,9 +28,16 @@ const ticketRecognition = (commitMessage) => {
|
|
|
28
28
|
};
|
|
29
29
|
const createReleaseSubtitle = (group, repository) => {
|
|
30
30
|
const latestTag = 'v' + process.env.npm_package_version;
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
31
|
+
const unreleasedChanges = latestTag === group.previousTag;
|
|
32
|
+
const latestVersion = unreleasedChanges ? 'Unreleased changes' : latestTag;
|
|
33
|
+
const tagIsHead = group.tag === 'HEAD';
|
|
34
|
+
const subtitleLinkText = tagIsHead ? latestVersion : group.tag;
|
|
35
|
+
const subtitleLinkCurrentTag = tagIsHead
|
|
36
|
+
? unreleasedChanges
|
|
37
|
+
? 'HEAD'
|
|
38
|
+
: latestTag
|
|
39
|
+
: group.tag;
|
|
40
|
+
const subtitleLink = `${repository}/compare/${group.previousTag}...${subtitleLinkCurrentTag}`;
|
|
34
41
|
const subtitle = `${createLink(subtitleLinkText, subtitleLink)}`;
|
|
35
42
|
return `#### ${repository ? subtitle : subtitleLinkText}`;
|
|
36
43
|
};
|
package/package.json
CHANGED