Gets a list of categorized commits from all commits in the release period.
(commits: CommitFromGitLog[])
| 66 | |
| 67 | /** Gets a list of categorized commits from all commits in the release period. */ |
| 68 | _categorizeCommits(commits: CommitFromGitLog[]): CategorizedCommit[] { |
| 69 | return commits.map((commit) => { |
| 70 | const {description, groupName} = this.data.categorizeCommit?.(commit) ?? {}; |
| 71 | const escapedBreakingChanges = commit.breakingChanges.map((bc) => ({ |
| 72 | ...bc, |
| 73 | text: escapeHtml(bc.text), |
| 74 | })); |
| 75 | const escapedDeprecations = commit.deprecations.map((dep) => ({ |
| 76 | ...dep, |
| 77 | text: escapeHtml(dep.text), |
| 78 | })); |
| 79 | return { |
| 80 | ...commit, |
| 81 | type: escapeHtml(commit.type), |
| 82 | groupName: escapeHtml(groupName ?? commit.scope), |
| 83 | description: escapeHtml(description ?? commit.subject), |
| 84 | breakingChanges: escapedBreakingChanges, |
| 85 | deprecations: escapedDeprecations, |
| 86 | }; |
| 87 | }); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Comparator used for sorting commits within a release notes group. Commits |