Skip to content

Commit

Permalink
feat add changelog generation support
Browse files Browse the repository at this point in the history
  • Loading branch information
wallet77 committed Jan 23, 2018
1 parent 1960169 commit 14f53fc
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .changelogrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"app_name": "",
"logo": "",
"intro": "",
"branch" : "master",
"repo_url": "https://github.com/Unitech/pm2",
"version_name" : "v2.9.2",
"tag": "2.9.1",
"file": "currentTagChangelog.md",
"template": "template.md",
"sections": [
{
"title": "Bug Fixes",
"grep": "^fix"
},
{
"title": "Features",
"grep": "^feat"
},
{
"title": "Documentation",
"grep": "^docs"
},
{
"title": "Breaking changes",
"grep": "BREAKING"
},
{
"title": "Refactor",
"grep": "^refactor"
},
{
"title": "Style",
"grep": "^style"
},
{
"title": "Test",
"grep": "^test"
},
{
"title": "Chore",
"grep": "^chore"
},
{
"title": "Branchs merged",
"grep": "^Merge branch"
},
{
"title" : "Pull requests merged",
"grep": "^Merge pull request"
}
]
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/node_modules
*.log
*.log
*.pid
test/child
*.iml
Expand All @@ -15,3 +14,4 @@ package-lock.json
.DS_Store
*.swp
*.swo
currentTagChangelog.md
13 changes: 13 additions & 0 deletions template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<% if(logo) { %><img width="710px" src="<%= logo %>" alt="pm2 logo" /> <% } %>
<% if(logo) { %># <%= title %> <% } %>
<% if(intro) { %><%= '\n' %><%= intro %><%= '\n' %><% } %>
<% if(version && (version.name || version.number)) { %>##<% if(version.name){%> <%= version.name %><% } %> <% if(version.date){ %>( <%= version.date %> )<% } %><%= '\n' %><% } %>
<% _.forEach(sections, function(section){
if(section.commitsCount > 0) { %>
## <%= section.title %>
<% _.forEach(section.commits, function(commit){ %> - <%= printCommit(commit, true) %><% }) %>
<% _.forEach(section.components, function(component){ %> - **<%= component.name %>**
<% _.forEach(component.commits, function(commit){ %> - <%= printCommit(commit, true) %><% }) %>
<% }) %>
<% } %>
<% }) %>

0 comments on commit 14f53fc

Please sign in to comment.