git-release-manager 0.0.4 → 0.0.5
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/dist/cli/types/BranchCliArgs.js +3 -0
- package/dist/cli/types/BranchCliArgs.js.map +1 -0
- package/dist/{src/cli/types/ChnagelogCliArgs.js → cli/types/ChangelogCliArgs.js} +1 -1
- package/dist/cli/types/ChangelogCliArgs.js.map +1 -0
- package/dist/cli/types/CliArgs.js +3 -0
- package/dist/cli/types/CliArgs.js.map +1 -0
- package/dist/cli/types/VersionCliArgs.js +3 -0
- package/dist/cli/types/VersionCliArgs.js.map +1 -0
- package/dist/config/configLoader.js +61 -0
- package/dist/config/configLoader.js.map +1 -0
- package/dist/config/configManager.js +66 -0
- package/dist/config/configManager.js.map +1 -0
- package/dist/config/constants.js +10 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/defaults/config.json +232 -0
- package/dist/config/types/ChannelType.js +3 -0
- package/dist/config/types/ChannelType.js.map +1 -0
- package/dist/config/types/CommitType.js.map +1 -0
- package/dist/config/types/Config.js +3 -0
- package/dist/config/types/Config.js.map +1 -0
- package/dist/{src/core/types/RangeInfo.js → config/types/FileGroups.js} +1 -1
- package/dist/config/types/FileGroups.js.map +1 -0
- package/dist/{src/git → config}/types/LinkType.js.map +1 -1
- package/dist/config/types/MentionType.js.map +1 -0
- package/dist/config/types/NoteType.js +3 -0
- package/dist/config/types/NoteType.js.map +1 -0
- package/dist/config/types/Options.js +3 -0
- package/dist/config/types/Options.js.map +1 -0
- package/dist/core/changelog/app.js +40 -0
- package/dist/core/changelog/app.js.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/branch/BranchController.js +62 -0
- package/dist/modules/branch/BranchController.js.map +1 -0
- package/dist/modules/branch/BranchManager.js +194 -0
- package/dist/modules/branch/BranchManager.js.map +1 -0
- package/dist/modules/changelog/ChangelogValidator.js +19 -0
- package/dist/modules/changelog/ChangelogValidator.js.map +1 -0
- package/dist/modules/changelog/templateOperations.js +144 -0
- package/dist/modules/changelog/templateOperations.js.map +1 -0
- package/dist/modules/changes/types/ChangeInformation.js.map +1 -0
- package/dist/modules/changes/types/Context.js.map +1 -0
- package/dist/modules/changes/types/RangeInfo.js +8 -0
- package/dist/modules/changes/types/RangeInfo.js.map +1 -0
- package/dist/{src/core/types/RangeDetails.js → modules/changes/types/RangeSummary.js} +1 -1
- package/dist/modules/changes/types/RangeSummary.js.map +1 -0
- package/dist/modules/changes/types/ReferenceTypesEnum.js.map +1 -0
- package/dist/{src → modules}/git/commits/commitProcessor.js +5 -7
- package/dist/modules/git/commits/commitProcessor.js.map +1 -0
- package/dist/{src → modules}/git/commits/gitLogFetcher.js +2 -2
- package/dist/modules/git/commits/gitLogFetcher.js.map +1 -0
- package/dist/modules/git/commits/index.js +136 -0
- package/dist/modules/git/commits/index.js.map +1 -0
- package/dist/{src → modules}/git/commits/profileHandler.js +13 -8
- package/dist/modules/git/commits/profileHandler.js.map +1 -0
- package/dist/{src → modules}/git/commits/regexHandlers.js +5 -5
- package/dist/modules/git/commits/regexHandlers.js.map +1 -0
- package/dist/modules/git/context/branchHandler.js +18 -0
- package/dist/modules/git/context/branchHandler.js.map +1 -0
- package/dist/modules/git/context/commitHandler.js +29 -0
- package/dist/modules/git/context/commitHandler.js.map +1 -0
- package/dist/{src → modules}/git/context/index.js +6 -11
- package/dist/modules/git/context/index.js.map +1 -0
- package/dist/{src → modules}/git/context/remoteHandler.js +3 -8
- package/dist/modules/git/context/remoteHandler.js.map +1 -0
- package/dist/modules/git/context/statusHandler.js +16 -0
- package/dist/modules/git/context/statusHandler.js.map +1 -0
- package/dist/modules/git/context/tagHandler.js +28 -0
- package/dist/modules/git/context/tagHandler.js.map +1 -0
- package/dist/modules/git/gitOperations.js +56 -0
- package/dist/modules/git/gitOperations.js.map +1 -0
- package/dist/modules/git/types/Author.js.map +1 -0
- package/dist/modules/git/types/Branch.js +3 -0
- package/dist/modules/git/types/Branch.js.map +1 -0
- package/dist/modules/git/types/BranchInfo.js.map +1 -0
- package/dist/modules/git/types/CommitContent.js.map +1 -0
- package/dist/modules/git/types/CommitInfo.js.map +1 -0
- package/dist/modules/git/types/CommitType.js +3 -0
- package/dist/modules/git/types/CommitType.js.map +1 -0
- package/dist/modules/git/types/GitCommit.js.map +1 -0
- package/dist/modules/git/types/GitReference.js +3 -0
- package/dist/modules/git/types/GitReference.js.map +1 -0
- package/dist/{src → modules}/git/types/Link.js.map +1 -1
- package/dist/modules/git/types/Mention.js.map +1 -0
- package/dist/{src → modules}/git/types/Note.js.map +1 -1
- package/dist/modules/git/types/RemoteInfo.js.map +1 -0
- package/dist/modules/git/types/Repository.js.map +1 -0
- package/dist/modules/git/types/StatusInfo.js.map +1 -0
- package/dist/modules/git/types/Tag.js +3 -0
- package/dist/modules/git/types/Tag.js.map +1 -0
- package/dist/modules/git/types/TagInfo.js.map +1 -0
- package/dist/{src → modules}/git/utils/branchUtils.js +5 -7
- package/dist/modules/git/utils/branchUtils.js.map +1 -0
- package/dist/{src → modules}/git/utils/commitUtils.js +3 -5
- package/dist/modules/git/utils/commitUtils.js.map +1 -0
- package/dist/modules/git/utils/logUtils.js.map +1 -0
- package/dist/modules/git/utils/rangeOperations.js.map +1 -0
- package/dist/modules/git/utils/refUtils.js.map +1 -0
- package/dist/{src → modules}/git/utils/referenceUtils.js +19 -22
- package/dist/modules/git/utils/referenceUtils.js.map +1 -0
- package/dist/{src → modules}/git/utils/tagUtils.js +7 -6
- package/dist/modules/git/utils/tagUtils.js.map +1 -0
- package/dist/{src → modules}/output/writer.js +2 -2
- package/dist/modules/output/writer.js.map +1 -0
- package/dist/{src → modules}/sections/contributors.js +4 -4
- package/dist/modules/sections/contributors.js.map +1 -0
- package/dist/{src → modules}/sections/grouping.js +12 -18
- package/dist/modules/sections/grouping.js.map +1 -0
- package/dist/{src → modules}/sections/index.js +1 -2
- package/dist/modules/sections/index.js.map +1 -0
- package/dist/{src → modules}/sections/summarizing.js +11 -15
- package/dist/modules/sections/summarizing.js.map +1 -0
- package/dist/modules/sections/types/Contributor.js +3 -0
- package/dist/modules/sections/types/Contributor.js.map +1 -0
- package/dist/modules/sections/types/Group.js.map +1 -0
- package/dist/modules/sections/types/SectionSummary.js +3 -0
- package/dist/modules/sections/types/SectionSummary.js.map +1 -0
- package/dist/modules/sections/types/Sections.js.map +1 -0
- package/dist/modules/version/GitVersionManager.js +153 -0
- package/dist/modules/version/GitVersionManager.js.map +1 -0
- package/dist/modules/version/ReleaseManager.js +69 -0
- package/dist/modules/version/ReleaseManager.js.map +1 -0
- package/dist/modules/version/VersionManager.js +77 -0
- package/dist/modules/version/VersionManager.js.map +1 -0
- package/dist/modules/version/VersionValidator.js +31 -0
- package/dist/modules/version/VersionValidator.js.map +1 -0
- package/dist/modules/version/types/const.js +3 -0
- package/dist/modules/version/types/const.js.map +1 -0
- package/dist/modules/version/versionFormatter.js +104 -0
- package/dist/modules/version/versionFormatter.js.map +1 -0
- package/dist/modules/version/versionHelper.js +9 -0
- package/dist/modules/version/versionHelper.js.map +1 -0
- package/dist/src/cli/types/BranchCliArgs.js +3 -0
- package/dist/src/cli/types/BranchCliArgs.js.map +1 -0
- package/dist/src/cli/types/VersionCliArgs.js +3 -0
- package/dist/src/cli/types/VersionCliArgs.js.map +1 -0
- package/dist/src/config/defaults/config.json +231 -231
- package/dist/src/core/changelog/app.js +5 -4
- package/dist/src/core/changelog/app.js.map +1 -1
- package/dist/src/index.js +132 -14
- package/dist/src/index.js.map +1 -1
- package/dist/src/modules/changelog/templateOperations.js +37 -24
- package/dist/src/modules/changelog/templateOperations.js.map +1 -1
- package/dist/src/modules/git/commits/commitProcessor.js +2 -4
- package/dist/src/modules/git/commits/commitProcessor.js.map +1 -1
- package/dist/src/modules/git/commits/index.js +26 -26
- package/dist/src/modules/git/commits/index.js.map +1 -1
- package/dist/src/modules/git/commits/profileHandler.js +5 -2
- package/dist/src/modules/git/commits/profileHandler.js.map +1 -1
- package/dist/src/modules/git/context/branchHandler.js +4 -9
- package/dist/src/modules/git/context/branchHandler.js.map +1 -1
- package/dist/src/modules/git/context/commitHandler.js +9 -14
- package/dist/src/modules/git/context/commitHandler.js.map +1 -1
- package/dist/src/modules/git/context/index.js +5 -7
- package/dist/src/modules/git/context/index.js.map +1 -1
- package/dist/src/modules/git/context/remoteHandler.js +3 -8
- package/dist/src/modules/git/context/remoteHandler.js.map +1 -1
- package/dist/src/modules/git/context/statusHandler.js +3 -8
- package/dist/src/modules/git/context/statusHandler.js.map +1 -1
- package/dist/src/modules/git/context/tagHandler.js +3 -8
- package/dist/src/modules/git/context/tagHandler.js.map +1 -1
- package/dist/src/modules/git/gitOperations.js +10 -10
- package/dist/src/modules/git/gitOperations.js.map +1 -1
- package/dist/src/modules/git/utils/branchUtils.js +2 -4
- package/dist/src/modules/git/utils/branchUtils.js.map +1 -1
- package/dist/src/modules/git/utils/commitUtils.js +2 -4
- package/dist/src/modules/git/utils/commitUtils.js.map +1 -1
- package/dist/src/modules/git/utils/referenceUtils.js +9 -6
- package/dist/src/modules/git/utils/referenceUtils.js.map +1 -1
- package/dist/src/modules/git/utils/tagUtils.js +5 -4
- package/dist/src/modules/git/utils/tagUtils.js.map +1 -1
- package/dist/src/modules/sections/grouping.js +5 -5
- package/dist/src/modules/sections/grouping.js.map +1 -1
- package/dist/src/modules/sections/index.js.map +1 -1
- package/dist/src/modules/sections/summarizing.js +4 -4
- package/dist/src/modules/sections/summarizing.js.map +1 -1
- package/dist/src/templates/defaults/changelog.detailed.ejs +110 -110
- package/dist/src/templates/defaults/changelog.ejs +67 -67
- package/dist/src/utils/cmd.js +15 -0
- package/dist/src/utils/cmd.js.map +1 -1
- package/dist/templates/constants.js.map +1 -0
- package/dist/{src/modules/templates → templates}/defaults/changelog.detailed.ejs +110 -110
- package/dist/{src/modules/templates → templates}/defaults/changelog.ejs +67 -67
- package/dist/templates/templateRenderer.js.map +1 -0
- package/dist/templates/templateResolver.js.map +1 -0
- package/dist/{src → types}/PackageJson.js.map +1 -1
- package/dist/utils/cmd.js +42 -0
- package/dist/utils/cmd.js.map +1 -0
- package/dist/utils/date.js +20 -0
- package/dist/utils/date.js.map +1 -0
- package/package.json +64 -61
- package/dist/src/cli/types/ChnagelogCliArgs.js.map +0 -1
- package/dist/src/core/app-old.js +0 -35
- package/dist/src/core/app-old.js.map +0 -1
- package/dist/src/core/app.js +0 -19
- package/dist/src/core/app.js.map +0 -1
- package/dist/src/core/gitOperations.js +0 -95
- package/dist/src/core/gitOperations.js.map +0 -1
- package/dist/src/core/rangeOperations.js.map +0 -1
- package/dist/src/core/templateOperations.js +0 -157
- package/dist/src/core/templateOperations.js.map +0 -1
- package/dist/src/core/types/ChangeInformation.js.map +0 -1
- package/dist/src/core/types/Context.js.map +0 -1
- package/dist/src/core/types/RangeDetails.js.map +0 -1
- package/dist/src/core/types/RangeInfo.js.map +0 -1
- package/dist/src/core/types/ReferenceTypesEnum.js.map +0 -1
- package/dist/src/core/types/Repository.js.map +0 -1
- package/dist/src/git/commits/commitProcessor.js.map +0 -1
- package/dist/src/git/commits/gitLogFetcher.js.map +0 -1
- package/dist/src/git/commits/index.js +0 -136
- package/dist/src/git/commits/index.js.map +0 -1
- package/dist/src/git/commits/profileHandler.js.map +0 -1
- package/dist/src/git/commits/regexHandlers.js.map +0 -1
- package/dist/src/git/commits.js +0 -136
- package/dist/src/git/commits.js.map +0 -1
- package/dist/src/git/context/branchHandler.js +0 -23
- package/dist/src/git/context/branchHandler.js.map +0 -1
- package/dist/src/git/context/commitHandler.js +0 -30
- package/dist/src/git/context/commitHandler.js.map +0 -1
- package/dist/src/git/context/index.js.map +0 -1
- package/dist/src/git/context/remoteHandler.js.map +0 -1
- package/dist/src/git/context/statusHandler.js +0 -21
- package/dist/src/git/context/statusHandler.js.map +0 -1
- package/dist/src/git/context/tagHandler.js +0 -21
- package/dist/src/git/context/tagHandler.js.map +0 -1
- package/dist/src/git/context.js +0 -95
- package/dist/src/git/context.js.map +0 -1
- package/dist/src/git/types/Author.js.map +0 -1
- package/dist/src/git/types/BranchInfo.js.map +0 -1
- package/dist/src/git/types/CommitContent.js.map +0 -1
- package/dist/src/git/types/CommitInfo.js.map +0 -1
- package/dist/src/git/types/CommitType.js.map +0 -1
- package/dist/src/git/types/CommitType2.js +0 -3
- package/dist/src/git/types/CommitType2.js.map +0 -1
- package/dist/src/git/types/GitCommit.js.map +0 -1
- package/dist/src/git/types/GitContext.js +0 -3
- package/dist/src/git/types/GitContext.js.map +0 -1
- package/dist/src/git/types/LinkType-.js +0 -3
- package/dist/src/git/types/LinkType-.js.map +0 -1
- package/dist/src/git/types/Mention.js.map +0 -1
- package/dist/src/git/types/MentionType-.js +0 -3
- package/dist/src/git/types/MentionType-.js.map +0 -1
- package/dist/src/git/types/MentionType.js.map +0 -1
- package/dist/src/git/types/RemoteInfo.js.map +0 -1
- package/dist/src/git/types/StatusInfo.js.map +0 -1
- package/dist/src/git/types/TagInfo.js.map +0 -1
- package/dist/src/git/utils/branchUtils.js.map +0 -1
- package/dist/src/git/utils/commitUtils.js.map +0 -1
- package/dist/src/git/utils/logUtils.js.map +0 -1
- package/dist/src/git/utils/refUtils.js.map +0 -1
- package/dist/src/git/utils/referenceUtils.js.map +0 -1
- package/dist/src/git/utils/tagUtils.js.map +0 -1
- package/dist/src/main.js +0 -16
- package/dist/src/main.js.map +0 -1
- package/dist/src/modules/changes/types/RangeDetail.js +0 -3
- package/dist/src/modules/changes/types/RangeDetail.js.map +0 -1
- package/dist/src/modules/changes/types/RangeDetails.js +0 -3
- package/dist/src/modules/changes/types/RangeDetails.js.map +0 -1
- package/dist/src/modules/git/types/GitContext.js +0 -3
- package/dist/src/modules/git/types/GitContext.js.map +0 -1
- package/dist/src/modules/repository/types/Repository.js +0 -3
- package/dist/src/modules/repository/types/Repository.js.map +0 -1
- package/dist/src/modules/templates/constants.js.map +0 -1
- package/dist/src/modules/templates/templateRenderer.js.map +0 -1
- package/dist/src/modules/templates/templateResolver.js.map +0 -1
- package/dist/src/output/writer.js.map +0 -1
- package/dist/src/sections/contributors.js.map +0 -1
- package/dist/src/sections/grouping.js.map +0 -1
- package/dist/src/sections/index.js.map +0 -1
- package/dist/src/sections/summarizing.js.map +0 -1
- package/dist/src/sections/types/Contributor.js +0 -15
- package/dist/src/sections/types/Contributor.js.map +0 -1
- package/dist/src/sections/types/Group.js.map +0 -1
- package/dist/src/sections/types/SectionSummary.js +0 -13
- package/dist/src/sections/types/SectionSummary.js.map +0 -1
- package/dist/src/sections/types/Sections.js.map +0 -1
- package/dist/src/templates/index.js +0 -100
- package/dist/src/templates/index.js.map +0 -1
- package/dist/src/utils/git-utils.js +0 -279
- package/dist/src/utils/git-utils.js.map +0 -1
- package/dist/src/utils/helpers.js +0 -10
- package/dist/src/utils/helpers.js.map +0 -1
- /package/dist/{src/git → config}/types/CommitType.js +0 -0
- /package/dist/{src/git → config}/types/LinkType.js +0 -0
- /package/dist/{src/git → config}/types/MentionType.js +0 -0
- /package/dist/{src/core → modules/changes}/types/ChangeInformation.js +0 -0
- /package/dist/{src/core → modules/changes}/types/Context.js +0 -0
- /package/dist/{src/core → modules/changes}/types/ReferenceTypesEnum.js +0 -0
- /package/dist/{src → modules}/git/types/Author.js +0 -0
- /package/dist/{src → modules}/git/types/BranchInfo.js +0 -0
- /package/dist/{src → modules}/git/types/CommitContent.js +0 -0
- /package/dist/{src → modules}/git/types/CommitInfo.js +0 -0
- /package/dist/{src → modules}/git/types/GitCommit.js +0 -0
- /package/dist/{src → modules}/git/types/Link.js +0 -0
- /package/dist/{src → modules}/git/types/Mention.js +0 -0
- /package/dist/{src → modules}/git/types/Note.js +0 -0
- /package/dist/{src → modules}/git/types/RemoteInfo.js +0 -0
- /package/dist/{src/core → modules/git}/types/Repository.js +0 -0
- /package/dist/{src → modules}/git/types/StatusInfo.js +0 -0
- /package/dist/{src → modules}/git/types/TagInfo.js +0 -0
- /package/dist/{src → modules}/git/utils/logUtils.js +0 -0
- /package/dist/{src/core → modules/git/utils}/rangeOperations.js +0 -0
- /package/dist/{src → modules}/git/utils/refUtils.js +0 -0
- /package/dist/{src → modules}/sections/types/Group.js +0 -0
- /package/dist/{src → modules}/sections/types/Sections.js +0 -0
- /package/dist/{src/modules/templates → templates}/constants.js +0 -0
- /package/dist/{src/modules/templates → templates}/templateRenderer.js +0 -0
- /package/dist/{src/modules/templates → templates}/templateResolver.js +0 -0
- /package/dist/{src → types}/PackageJson.js +0 -0
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
# <%= config.appName %> <%= changeInfo.header %> Release Notes - <%=
|
|
2
|
-
|
|
3
|
-
## Summary:
|
|
4
|
-
<% sections.summary.commits.forEach(function(commit) { %>
|
|
5
|
-
- <%= commit.title %>: <%= commit.count %> <%= commit.count === 1 ? 'commit' : 'commits' %>
|
|
6
|
-
<% }) %>
|
|
7
|
-
<% sections.summary.notes.forEach(function(note) { %>
|
|
8
|
-
- <%= note.title %>: <%= note.count %> <%= note.count === 1 ? 'note' : 'notes' %>
|
|
9
|
-
<% }) %>
|
|
10
|
-
and <%= sections.summary.contributors.length %> <%= sections.summary.contributors.length === 1 ? '❤️ contributor' : '❤️ contributors' %>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<% if (sections.notes.length > 0) { %>
|
|
14
|
-
## Notes
|
|
15
|
-
<% sections.notes.forEach((note) => { %>
|
|
16
|
-
### <%= note.title %>
|
|
17
|
-
<% note.items.forEach(item => { %>
|
|
18
|
-
<%
|
|
19
|
-
const commitLinks = `[#${item.commit.raw.shortHash}](#commit-${item.commit.raw.shortHash})`;
|
|
20
|
-
%>
|
|
21
|
-
- <%= item.note.content %> (<%= commitLinks %>)
|
|
22
|
-
<% }) %>
|
|
23
|
-
<% }) %>
|
|
24
|
-
<% } %>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<% if (sections.commits.length > 0) { %>
|
|
28
|
-
## Changes
|
|
29
|
-
<% sections.commits.forEach((section) => { %>
|
|
30
|
-
### <%= section.title %>:
|
|
31
|
-
<%
|
|
32
|
-
// Group commits by scope
|
|
33
|
-
const scopedCommits = {};
|
|
34
|
-
const unscopedCommits = [];
|
|
35
|
-
|
|
36
|
-
section.items.forEach(commit => {
|
|
37
|
-
if (commit.scope) {
|
|
38
|
-
if (!scopedCommits[commit.scope]) {
|
|
39
|
-
scopedCommits[commit.scope] = [];
|
|
40
|
-
}
|
|
41
|
-
scopedCommits[commit.scope].push(commit);
|
|
42
|
-
} else {
|
|
43
|
-
unscopedCommits.push(commit);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
%>
|
|
47
|
-
|
|
48
|
-
<% // Show commits with scope
|
|
49
|
-
Object.keys(scopedCommits).sort().forEach(scope => { %>
|
|
50
|
-
#### <%= scope %>
|
|
51
|
-
<% scopedCommits[scope].forEach(commit => {
|
|
52
|
-
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
53
|
-
const mentions = commit.mentions
|
|
54
|
-
? commit.mentions
|
|
55
|
-
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
56
|
-
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
57
|
-
.join(', ')
|
|
58
|
-
: '';
|
|
59
|
-
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
60
|
-
|
|
61
|
-
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
62
|
-
|
|
63
|
-
const issueLinks = commit.links && commit.links.length > 0
|
|
64
|
-
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
65
|
-
: '';
|
|
66
|
-
%>
|
|
67
|
-
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
68
|
-
<% if (commit.description) { %>
|
|
69
|
-
|
|
70
|
-
<%= commit.description?.split('\n').map(line => `\t${line.trim()}`).join('\n') %>
|
|
71
|
-
<% } %>
|
|
72
|
-
<% }); %>
|
|
73
|
-
<% }); %>
|
|
74
|
-
|
|
75
|
-
<% // Show commits without scope
|
|
76
|
-
unscopedCommits.forEach(commit => {
|
|
77
|
-
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
78
|
-
const mentions = commit.mentions
|
|
79
|
-
? commit.mentions
|
|
80
|
-
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
81
|
-
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
82
|
-
.join(', ')
|
|
83
|
-
: '';
|
|
84
|
-
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
85
|
-
|
|
86
|
-
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
87
|
-
|
|
88
|
-
const issueLinks = commit.links && commit.links.length > 0
|
|
89
|
-
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
90
|
-
: '';
|
|
91
|
-
%>
|
|
92
|
-
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
93
|
-
<% if (commit.description) { %>
|
|
94
|
-
|
|
95
|
-
<%= commit.description %>
|
|
96
|
-
<% } %>
|
|
97
|
-
<% }); %>
|
|
98
|
-
<% }) %>
|
|
99
|
-
<% } %>
|
|
100
|
-
|
|
101
|
-
## Useful Links
|
|
102
|
-
- 📜 [Full Changelog](<%= repository.remote.repoUrl %>/blob/main/CHANGELOG.md)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<% if (sections.contributors.length > 0) { %>
|
|
107
|
-
## Contributors:
|
|
108
|
-
<% sections.contributors.forEach((contributor) => { %>
|
|
109
|
-
- [<%= contributor.name %>](<%= contributor.profileUrl %>) <% if (contributor.groups.length > 0) { %>(<%= contributor.groups.map(group => group.title).join(', ') %>)<% } %>
|
|
110
|
-
<% }) %>
|
|
1
|
+
# <%= config.appName %> <%= changeInfo.header %> Release Notes - <%= latestReference?.date?.split("T")[0] %>
|
|
2
|
+
|
|
3
|
+
## Summary:
|
|
4
|
+
<% sections.summary.commits.forEach(function(commit) { %>
|
|
5
|
+
- <%= commit.title %>: <%= commit.count %> <%= commit.count === 1 ? 'commit' : 'commits' %>
|
|
6
|
+
<% }) %>
|
|
7
|
+
<% sections.summary.notes.forEach(function(note) { %>
|
|
8
|
+
- <%= note.title %>: <%= note.count %> <%= note.count === 1 ? 'note' : 'notes' %>
|
|
9
|
+
<% }) %>
|
|
10
|
+
and <%= sections.summary.contributors.length %> <%= sections.summary.contributors.length === 1 ? '❤️ contributor' : '❤️ contributors' %>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<% if (sections.notes.length > 0) { %>
|
|
14
|
+
## Notes
|
|
15
|
+
<% sections.notes.forEach((note) => { %>
|
|
16
|
+
### <%= note.title %>
|
|
17
|
+
<% note.items.forEach(item => { %>
|
|
18
|
+
<%
|
|
19
|
+
const commitLinks = `[#${item.commit.raw.shortHash}](#commit-${item.commit.raw.shortHash})`;
|
|
20
|
+
%>
|
|
21
|
+
- <%= item.note.content %> (<%= commitLinks %>)
|
|
22
|
+
<% }) %>
|
|
23
|
+
<% }) %>
|
|
24
|
+
<% } %>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<% if (sections.commits.length > 0) { %>
|
|
28
|
+
## Changes
|
|
29
|
+
<% sections.commits.forEach((section) => { %>
|
|
30
|
+
### <%= section.title %>:
|
|
31
|
+
<%
|
|
32
|
+
// Group commits by scope
|
|
33
|
+
const scopedCommits = {};
|
|
34
|
+
const unscopedCommits = [];
|
|
35
|
+
|
|
36
|
+
section.items.forEach(commit => {
|
|
37
|
+
if (commit.scope) {
|
|
38
|
+
if (!scopedCommits[commit.scope]) {
|
|
39
|
+
scopedCommits[commit.scope] = [];
|
|
40
|
+
}
|
|
41
|
+
scopedCommits[commit.scope].push(commit);
|
|
42
|
+
} else {
|
|
43
|
+
unscopedCommits.push(commit);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
%>
|
|
47
|
+
|
|
48
|
+
<% // Show commits with scope
|
|
49
|
+
Object.keys(scopedCommits).sort().forEach(scope => { %>
|
|
50
|
+
#### <%= scope %>
|
|
51
|
+
<% scopedCommits[scope].forEach(commit => {
|
|
52
|
+
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
53
|
+
const mentions = commit.mentions
|
|
54
|
+
? commit.mentions
|
|
55
|
+
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
56
|
+
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
57
|
+
.join(', ')
|
|
58
|
+
: '';
|
|
59
|
+
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
60
|
+
|
|
61
|
+
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
62
|
+
|
|
63
|
+
const issueLinks = commit.links && commit.links.length > 0
|
|
64
|
+
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
65
|
+
: '';
|
|
66
|
+
%>
|
|
67
|
+
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
68
|
+
<% if (commit.description) { %>
|
|
69
|
+
|
|
70
|
+
<%= commit.description?.split('\n').map(line => `\t${line.trim()}`).join('\n') %>
|
|
71
|
+
<% } %>
|
|
72
|
+
<% }); %>
|
|
73
|
+
<% }); %>
|
|
74
|
+
|
|
75
|
+
<% // Show commits without scope
|
|
76
|
+
unscopedCommits.forEach(commit => {
|
|
77
|
+
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
78
|
+
const mentions = commit.mentions
|
|
79
|
+
? commit.mentions
|
|
80
|
+
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
81
|
+
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
82
|
+
.join(', ')
|
|
83
|
+
: '';
|
|
84
|
+
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
85
|
+
|
|
86
|
+
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
87
|
+
|
|
88
|
+
const issueLinks = commit.links && commit.links.length > 0
|
|
89
|
+
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
90
|
+
: '';
|
|
91
|
+
%>
|
|
92
|
+
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
93
|
+
<% if (commit.description) { %>
|
|
94
|
+
|
|
95
|
+
<%= commit.description %>
|
|
96
|
+
<% } %>
|
|
97
|
+
<% }); %>
|
|
98
|
+
<% }) %>
|
|
99
|
+
<% } %>
|
|
100
|
+
|
|
101
|
+
## Useful Links
|
|
102
|
+
- 📜 [Full Changelog](<%= repository.remote.repoUrl %>/blob/main/CHANGELOG.md)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
<% if (sections.contributors.length > 0) { %>
|
|
107
|
+
## Contributors:
|
|
108
|
+
<% sections.contributors.forEach((contributor) => { %>
|
|
109
|
+
- [<%= contributor.name %>](<%= contributor.profileUrl %>) <% if (contributor.groups.length > 0) { %>(<%= contributor.groups.map(group => group.title).join(', ') %>)<% } %>
|
|
110
|
+
<% }) %>
|
|
111
111
|
<% } %>
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
# <%= config.appName %> <%= changeInfo.header %> Release Notes - <%=
|
|
2
|
-
|
|
3
|
-
## Summary:
|
|
4
|
-
<% sections.summary.commits.forEach(function(commit) { %>
|
|
5
|
-
- <%= commit.title %>: <%= commit.count %> <%= commit.count === 1 ? 'commit' : 'commits' %>
|
|
6
|
-
<% }) %>
|
|
7
|
-
<% sections.summary.notes.forEach(function(note) { %>
|
|
8
|
-
- <%= note.title %>: <%= note.count %> <%= note.count === 1 ? 'note' : 'notes' %>
|
|
9
|
-
<% }) %>
|
|
10
|
-
and <%= sections.summary.contributors.length %> <%= sections.summary.contributors.length === 1 ? '❤️ contributor' : '❤️ contributors' %>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<% if (sections.notes.length > 0) { %>
|
|
14
|
-
## Notes
|
|
15
|
-
<% sections.notes.forEach((note) => { %>
|
|
16
|
-
### <%= note.title %>
|
|
17
|
-
<% note.items.forEach(item => { %>
|
|
18
|
-
<%
|
|
19
|
-
const commitLinks = `[#${item.commit.raw.shortHash}](#commit-${item.commit.raw.shortHash})`;
|
|
20
|
-
%>
|
|
21
|
-
- <%= item.note.content %> (<%= commitLinks %>)
|
|
22
|
-
<% }) %>
|
|
23
|
-
<% }) %>
|
|
24
|
-
<% } %>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<% if (sections.commits.length > 0) { %>
|
|
28
|
-
## Changes
|
|
29
|
-
<% sections.commits.forEach((section) => { %>
|
|
30
|
-
### <%= section.title %>:
|
|
31
|
-
<%
|
|
32
|
-
section.items.forEach(commit => {
|
|
33
|
-
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
34
|
-
const mentions = commit.mentions
|
|
35
|
-
? commit.mentions
|
|
36
|
-
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
37
|
-
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
38
|
-
.join(', ')
|
|
39
|
-
: '';
|
|
40
|
-
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
41
|
-
|
|
42
|
-
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
43
|
-
|
|
44
|
-
const issueLinks = commit.links && commit.links.length > 0
|
|
45
|
-
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
46
|
-
: '';
|
|
47
|
-
|
|
48
|
-
const scopeText = commit.scope ? `**${commit.scope}** ` : '';
|
|
49
|
-
%>
|
|
50
|
-
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= scopeText %><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
51
|
-
<% if (commit.description) { %>
|
|
52
|
-
|
|
53
|
-
<%= commit.description?.split('\n').map(line => `\t${line.trim()}`).join('\n') %>
|
|
54
|
-
<% } %>
|
|
55
|
-
<% }); %>
|
|
56
|
-
<% }) %>
|
|
57
|
-
<% } %>
|
|
58
|
-
|
|
59
|
-
## Useful Links
|
|
60
|
-
- 📜 [Full Changelog](<%= repository.remote.repoUrl %>/blob/main/CHANGELOG.md)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<% if (sections.contributors.length > 0) { %>
|
|
64
|
-
## Contributors:
|
|
65
|
-
<% sections.contributors.forEach((contributor) => { %>
|
|
66
|
-
- [<%= contributor.name %>](<%= contributor.profileUrl %>) <% if (contributor.groups.length > 0) { %>(<%= contributor.groups.map(group => group.title).join(', ') %>)<% } %>
|
|
67
|
-
<% }) %>
|
|
1
|
+
# <%= config.appName %> <%= changeInfo.header %> Release Notes - <%= latestReference?.date?.split("T")[0] %>
|
|
2
|
+
|
|
3
|
+
## Summary:
|
|
4
|
+
<% sections.summary.commits.forEach(function(commit) { %>
|
|
5
|
+
- <%= commit.title %>: <%= commit.count %> <%= commit.count === 1 ? 'commit' : 'commits' %>
|
|
6
|
+
<% }) %>
|
|
7
|
+
<% sections.summary.notes.forEach(function(note) { %>
|
|
8
|
+
- <%= note.title %>: <%= note.count %> <%= note.count === 1 ? 'note' : 'notes' %>
|
|
9
|
+
<% }) %>
|
|
10
|
+
and <%= sections.summary.contributors.length %> <%= sections.summary.contributors.length === 1 ? '❤️ contributor' : '❤️ contributors' %>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<% if (sections.notes.length > 0) { %>
|
|
14
|
+
## Notes
|
|
15
|
+
<% sections.notes.forEach((note) => { %>
|
|
16
|
+
### <%= note.title %>
|
|
17
|
+
<% note.items.forEach(item => { %>
|
|
18
|
+
<%
|
|
19
|
+
const commitLinks = `[#${item.commit.raw.shortHash}](#commit-${item.commit.raw.shortHash})`;
|
|
20
|
+
%>
|
|
21
|
+
- <%= item.note.content %> (<%= commitLinks %>)
|
|
22
|
+
<% }) %>
|
|
23
|
+
<% }) %>
|
|
24
|
+
<% } %>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<% if (sections.commits.length > 0) { %>
|
|
28
|
+
## Changes
|
|
29
|
+
<% sections.commits.forEach((section) => { %>
|
|
30
|
+
### <%= section.title %>:
|
|
31
|
+
<%
|
|
32
|
+
section.items.forEach(commit => {
|
|
33
|
+
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
34
|
+
const mentions = commit.mentions
|
|
35
|
+
? commit.mentions
|
|
36
|
+
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
37
|
+
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
38
|
+
.join(', ')
|
|
39
|
+
: '';
|
|
40
|
+
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
41
|
+
|
|
42
|
+
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
43
|
+
|
|
44
|
+
const issueLinks = commit.links && commit.links.length > 0
|
|
45
|
+
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
46
|
+
: '';
|
|
47
|
+
|
|
48
|
+
const scopeText = commit.scope ? `**${commit.scope}** ` : '';
|
|
49
|
+
%>
|
|
50
|
+
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= scopeText %><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
51
|
+
<% if (commit.description) { %>
|
|
52
|
+
|
|
53
|
+
<%= commit.description?.split('\n').map(line => `\t${line.trim()}`).join('\n') %>
|
|
54
|
+
<% } %>
|
|
55
|
+
<% }); %>
|
|
56
|
+
<% }) %>
|
|
57
|
+
<% } %>
|
|
58
|
+
|
|
59
|
+
## Useful Links
|
|
60
|
+
- 📜 [Full Changelog](<%= repository.remote.repoUrl %>/blob/main/CHANGELOG.md)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<% if (sections.contributors.length > 0) { %>
|
|
64
|
+
## Contributors:
|
|
65
|
+
<% sections.contributors.forEach((contributor) => { %>
|
|
66
|
+
- [<%= contributor.name %>](<%= contributor.profileUrl %>) <% if (contributor.groups.length > 0) { %>(<%= contributor.groups.map(group => group.title).join(', ') %>)<% } %>
|
|
67
|
+
<% }) %>
|
|
68
68
|
<% } %>
|
package/dist/src/utils/cmd.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.runCommand = runCommand;
|
|
7
|
+
exports.execWithErrorHandling = execWithErrorHandling;
|
|
4
8
|
const child_process_1 = require("child_process");
|
|
9
|
+
const util_1 = __importDefault(require("util"));
|
|
10
|
+
const execPromise = util_1.default.promisify(child_process_1.exec);
|
|
5
11
|
function runCommand(cmd, onError) {
|
|
6
12
|
var _a;
|
|
7
13
|
try {
|
|
@@ -24,4 +30,13 @@ function runCommand(cmd, onError) {
|
|
|
24
30
|
return null;
|
|
25
31
|
}
|
|
26
32
|
}
|
|
33
|
+
async function execWithErrorHandling(command) {
|
|
34
|
+
try {
|
|
35
|
+
return await execPromise(command);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error(`Error executing "${command}":`, error);
|
|
39
|
+
return { stdout: '' };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
27
42
|
//# sourceMappingURL=cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd.js","sourceRoot":"","sources":["../../../src/utils/cmd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cmd.js","sourceRoot":"","sources":["../../../src/utils/cmd.ts"],"names":[],"mappings":";;;;;AAMA,gCAmBC;AAID,sDAOC;AApCD,iDAA+C;AAC/C,gDAAuB;AACvB,MAAM,WAAW,GAAG,cAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAA;AAIxC,SAAgB,UAAU,CAAC,GAAW,EAAE,OAAuB;;IAC3D,IAAI,CAAC;QACD,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACzC,MAAM,MAAM,GAAG,IAAA,yBAAS,EAAC,OAAO,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAA;QAE7D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,IAAI,EAAE,KAAI,EAAE,CAAA;QACtC,CAAC;aAAM,CAAC;YACJ,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;gBAC3C,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;YACrD,CAAC;YACD,OAAO,IAAI,CAAA;QACf,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;YAC3C,OAAO,CAAC,GAAG,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;QAC9E,CAAC;QACD,OAAO,IAAI,CAAA;IACf,CAAC;AACL,CAAC;AAIM,KAAK,UAAU,qBAAqB,CAAC,OAAe;IACvD,IAAI,CAAC;QACD,OAAO,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC;QACtD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC1B,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/templates/constants.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AAEV,QAAA,qBAAqB,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,wBAAwB,CAAC,CAAA;AACzE,QAAA,mBAAmB,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,8BAA8B,CAAC,CAAA"}
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
# <%= config.appName %> <%= changeInfo.header %> Release Notes - <%=
|
|
2
|
-
|
|
3
|
-
## Summary:
|
|
4
|
-
<% sections.summary.commits.forEach(function(commit) { %>
|
|
5
|
-
- <%= commit.title %>: <%= commit.count %> <%= commit.count === 1 ? 'commit' : 'commits' %>
|
|
6
|
-
<% }) %>
|
|
7
|
-
<% sections.summary.notes.forEach(function(note) { %>
|
|
8
|
-
- <%= note.title %>: <%= note.count %> <%= note.count === 1 ? 'note' : 'notes' %>
|
|
9
|
-
<% }) %>
|
|
10
|
-
and <%= sections.summary.contributors.length %> <%= sections.summary.contributors.length === 1 ? '❤️ contributor' : '❤️ contributors' %>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<% if (sections.notes.length > 0) { %>
|
|
14
|
-
## Notes
|
|
15
|
-
<% sections.notes.forEach((note) => { %>
|
|
16
|
-
### <%= note.title %>
|
|
17
|
-
<% note.items.forEach(item => { %>
|
|
18
|
-
<%
|
|
19
|
-
const commitLinks = `[#${item.commit.raw.shortHash}](#commit-${item.commit.raw.shortHash})`;
|
|
20
|
-
%>
|
|
21
|
-
- <%= item.note.content %> (<%= commitLinks %>)
|
|
22
|
-
<% }) %>
|
|
23
|
-
<% }) %>
|
|
24
|
-
<% } %>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<% if (sections.commits.length > 0) { %>
|
|
28
|
-
## Changes
|
|
29
|
-
<% sections.commits.forEach((section) => { %>
|
|
30
|
-
### <%= section.title %>:
|
|
31
|
-
<%
|
|
32
|
-
//
|
|
33
|
-
const scopedCommits = {};
|
|
34
|
-
const unscopedCommits = [];
|
|
35
|
-
|
|
36
|
-
section.items.forEach(commit => {
|
|
37
|
-
if (commit.scope) {
|
|
38
|
-
if (!scopedCommits[commit.scope]) {
|
|
39
|
-
scopedCommits[commit.scope] = [];
|
|
40
|
-
}
|
|
41
|
-
scopedCommits[commit.scope].push(commit);
|
|
42
|
-
} else {
|
|
43
|
-
unscopedCommits.push(commit);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
%>
|
|
47
|
-
|
|
48
|
-
<% //
|
|
49
|
-
Object.keys(scopedCommits).sort().forEach(scope => { %>
|
|
50
|
-
#### <%= scope %>
|
|
51
|
-
<% scopedCommits[scope].forEach(commit => {
|
|
52
|
-
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
53
|
-
const mentions = commit.mentions
|
|
54
|
-
? commit.mentions
|
|
55
|
-
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
56
|
-
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
57
|
-
.join(', ')
|
|
58
|
-
: '';
|
|
59
|
-
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
60
|
-
|
|
61
|
-
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
62
|
-
|
|
63
|
-
const issueLinks = commit.links && commit.links.length > 0
|
|
64
|
-
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
65
|
-
: '';
|
|
66
|
-
%>
|
|
67
|
-
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
68
|
-
<% if (commit.description) { %>
|
|
69
|
-
|
|
70
|
-
<%= commit.description?.split('\n').map(line => `\t${line.trim()}`).join('\n') %>
|
|
71
|
-
<% } %>
|
|
72
|
-
<% }); %>
|
|
73
|
-
<% }); %>
|
|
74
|
-
|
|
75
|
-
<% //
|
|
76
|
-
unscopedCommits.forEach(commit => {
|
|
77
|
-
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
78
|
-
const mentions = commit.mentions
|
|
79
|
-
? commit.mentions
|
|
80
|
-
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
81
|
-
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
82
|
-
.join(', ')
|
|
83
|
-
: '';
|
|
84
|
-
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
85
|
-
|
|
86
|
-
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
87
|
-
|
|
88
|
-
const issueLinks = commit.links && commit.links.length > 0
|
|
89
|
-
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
90
|
-
: '';
|
|
91
|
-
%>
|
|
92
|
-
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
93
|
-
<% if (commit.description) { %>
|
|
94
|
-
|
|
95
|
-
<%= commit.description %>
|
|
96
|
-
<% } %>
|
|
97
|
-
<% }); %>
|
|
98
|
-
<% }) %>
|
|
99
|
-
<% } %>
|
|
100
|
-
|
|
101
|
-
## Useful Links
|
|
102
|
-
- 📜 [Full Changelog](<%= repository.remote.repoUrl %>/blob/main/CHANGELOG.md)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<% if (sections.contributors.length > 0) { %>
|
|
107
|
-
## Contributors:
|
|
108
|
-
<% sections.contributors.forEach((contributor) => { %>
|
|
109
|
-
- [<%= contributor.name %>](<%= contributor.profileUrl %>) <% if (contributor.groups.length > 0) { %>(<%= contributor.groups.map(group => group.title).join(', ') %>)<% } %>
|
|
110
|
-
<% }) %>
|
|
1
|
+
# <%= config.appName %> <%= changeInfo.header %> Release Notes - <%= latestReference?.date?.split("T")[0] %>
|
|
2
|
+
|
|
3
|
+
## Summary:
|
|
4
|
+
<% sections.summary.commits.forEach(function(commit) { %>
|
|
5
|
+
- <%= commit.title %>: <%= commit.count %> <%= commit.count === 1 ? 'commit' : 'commits' %>
|
|
6
|
+
<% }) %>
|
|
7
|
+
<% sections.summary.notes.forEach(function(note) { %>
|
|
8
|
+
- <%= note.title %>: <%= note.count %> <%= note.count === 1 ? 'note' : 'notes' %>
|
|
9
|
+
<% }) %>
|
|
10
|
+
and <%= sections.summary.contributors.length %> <%= sections.summary.contributors.length === 1 ? '❤️ contributor' : '❤️ contributors' %>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<% if (sections.notes.length > 0) { %>
|
|
14
|
+
## Notes
|
|
15
|
+
<% sections.notes.forEach((note) => { %>
|
|
16
|
+
### <%= note.title %>
|
|
17
|
+
<% note.items.forEach(item => { %>
|
|
18
|
+
<%
|
|
19
|
+
const commitLinks = `[#${item.commit.raw.shortHash}](#commit-${item.commit.raw.shortHash})`;
|
|
20
|
+
%>
|
|
21
|
+
- <%= item.note.content %> (<%= commitLinks %>)
|
|
22
|
+
<% }) %>
|
|
23
|
+
<% }) %>
|
|
24
|
+
<% } %>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<% if (sections.commits.length > 0) { %>
|
|
28
|
+
## Changes
|
|
29
|
+
<% sections.commits.forEach((section) => { %>
|
|
30
|
+
### <%= section.title %>:
|
|
31
|
+
<%
|
|
32
|
+
// Group commits by scope
|
|
33
|
+
const scopedCommits = {};
|
|
34
|
+
const unscopedCommits = [];
|
|
35
|
+
|
|
36
|
+
section.items.forEach(commit => {
|
|
37
|
+
if (commit.scope) {
|
|
38
|
+
if (!scopedCommits[commit.scope]) {
|
|
39
|
+
scopedCommits[commit.scope] = [];
|
|
40
|
+
}
|
|
41
|
+
scopedCommits[commit.scope].push(commit);
|
|
42
|
+
} else {
|
|
43
|
+
unscopedCommits.push(commit);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
%>
|
|
47
|
+
|
|
48
|
+
<% // Show commits with scope
|
|
49
|
+
Object.keys(scopedCommits).sort().forEach(scope => { %>
|
|
50
|
+
#### <%= scope %>
|
|
51
|
+
<% scopedCommits[scope].forEach(commit => {
|
|
52
|
+
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
53
|
+
const mentions = commit.mentions
|
|
54
|
+
? commit.mentions
|
|
55
|
+
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
56
|
+
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
57
|
+
.join(', ')
|
|
58
|
+
: '';
|
|
59
|
+
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
60
|
+
|
|
61
|
+
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
62
|
+
|
|
63
|
+
const issueLinks = commit.links && commit.links.length > 0
|
|
64
|
+
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
65
|
+
: '';
|
|
66
|
+
%>
|
|
67
|
+
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
68
|
+
<% if (commit.description) { %>
|
|
69
|
+
|
|
70
|
+
<%= commit.description?.split('\n').map(line => `\t${line.trim()}`).join('\n') %>
|
|
71
|
+
<% } %>
|
|
72
|
+
<% }); %>
|
|
73
|
+
<% }); %>
|
|
74
|
+
|
|
75
|
+
<% // Show commits without scope
|
|
76
|
+
unscopedCommits.forEach(commit => {
|
|
77
|
+
const author = `[@${commit.author.name}](${commit.author.profileUrl})`;
|
|
78
|
+
const mentions = commit.mentions
|
|
79
|
+
? commit.mentions
|
|
80
|
+
.filter(mention => ['co-authored-by', 'helped-by'].includes(mention.type))
|
|
81
|
+
.map(mention => `[@${mention.name}](${mention.profileUrl})`)
|
|
82
|
+
.join(', ')
|
|
83
|
+
: '';
|
|
84
|
+
const authorText = mentions ? `${author} with ${mentions}` : author;
|
|
85
|
+
|
|
86
|
+
const commitLink = `[#${commit.raw.shortHash}](${repository.remote.repoUrl}/commit/${commit.raw.hash})`;
|
|
87
|
+
|
|
88
|
+
const issueLinks = commit.links && commit.links.length > 0
|
|
89
|
+
? ` (${commit.links.length === 1 ? 'Issue' : 'Issues'}: ${commit.links.map(link => `[#${link.id}](${repository.remote.repoUrl}/issues/${link.id})`).join(', ')})`
|
|
90
|
+
: '';
|
|
91
|
+
%>
|
|
92
|
+
- <a id="commit-<%= commit.raw.shortHash %>"></a><%= commitLink %>: <%= commit.summary %> (by <%= authorText %>) <%= issueLinks %>
|
|
93
|
+
<% if (commit.description) { %>
|
|
94
|
+
|
|
95
|
+
<%= commit.description %>
|
|
96
|
+
<% } %>
|
|
97
|
+
<% }); %>
|
|
98
|
+
<% }) %>
|
|
99
|
+
<% } %>
|
|
100
|
+
|
|
101
|
+
## Useful Links
|
|
102
|
+
- 📜 [Full Changelog](<%= repository.remote.repoUrl %>/blob/main/CHANGELOG.md)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
<% if (sections.contributors.length > 0) { %>
|
|
107
|
+
## Contributors:
|
|
108
|
+
<% sections.contributors.forEach((contributor) => { %>
|
|
109
|
+
- [<%= contributor.name %>](<%= contributor.profileUrl %>) <% if (contributor.groups.length > 0) { %>(<%= contributor.groups.map(group => group.title).join(', ') %>)<% } %>
|
|
110
|
+
<% }) %>
|
|
111
111
|
<% } %>
|