Skip to content

Commit ee337c0

Browse files
Alan Agiusmgechev
Alan Agius
authored andcommitted
docs: add breaking changes to changelog
1 parent f8fe4b0 commit ee337c0

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<%
2+
const breakingChanges = [];
3+
4+
for (const commit of commits) {
5+
const breakingChange = commit.notes.find(c => c.title === 'BREAKING CHANGE');
6+
if (breakingChange) {
7+
breakingChanges.push({
8+
scope: commit.scope,
9+
subject: commit.subject,
10+
shortSha: commit.hash.slice(0, 7),
11+
hash: commit.hash,
12+
breakingText: breakingChange.text,
13+
});
14+
}
15+
}
16+
17+
if (breakingChanges.length) {
18+
%>
19+
20+
# Breaking Changes
21+
<% for (const commit of breakingChanges) { %>
22+
23+
<h3>
24+
<%= `${commit.scope ? commit.scope + ': ' : ''}` %><%= commit.subject %> (<a href="https://github.com/angular/angular-cli/commit/<%= commit.hash %>"><%= commit.shortSha %></a>)
25+
</h3>
26+
<%= commit.breakingText %>
27+
<% }%>
28+
<% }%>

scripts/templates/changelog.ejs

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
101101
----
102102
103+
<%= include('./changelog-breaking-changes', { commits }) %>
104+
105+
----
106+
103107
# Special Thanks
104108
105109
<%= include('./changelog-special-thanks', { commits }) %>

0 commit comments

Comments
 (0)