Skip to content

Commit

Permalink
Merge pull request #3421 from Unitech/generate_changelog
Browse files Browse the repository at this point in the history
Generate changelog
  • Loading branch information
Unitech authored Jan 23, 2018
2 parents b4343de + 6da85a7 commit b069061
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .changelogrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"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": "changelogTemplate.md",
"sections": [
{
"title": "Bug Fixes",
"grep": "^fix"
},
{
"title": "Hot Fixes",
"grep": "^hotfix"
},
{
"title": "Features",
"grep": "^feat"
},
{
"title": "Documentation",
"grep": "^docs"
},
{
"title": "Breaking changes",
"grep": "BREAKING"
},
{
"title": "Refactor",
"grep": "^refactor"
},
{
"title": "Performance improvement",
"grep": "^perf"
},
{
"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
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ When you modify the Daemon (lib/Daemon.js, lib/God.js, lib/God/*, lib/Watcher.js
$ pm2 update
```

## Commit rules

### Commit message

A good commit message should describe what changed and why.

It should :
* contain a short description of the change (preferably 50 characters or less)
* be entirely in lowercase with the exception of proper nouns, acronyms, and the words that refer to code, like function/variable names
* be prefixed with one of the following word
* fix : bug fix
* hotfix : urgent bug fix
* feat : new or updated feature
* docs : documentation updates
* BREAKING : if commit is a breaking change
* refactor : code refactoring (no functional change)
* perf : performance improvement
* style : UX and display updates
* test : tests and CI updates
* chore : updates on build, tools, configuration ...
* Merge branch : when merging branch
* Merge pull request : when merging PR

## Tests

There are two tests type. Programmatic and Behavioral.
Expand Down
13 changes: 13 additions & 0 deletions changelogTemplate.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 b069061

Please sign in to comment.