Skip to content

Commit f18fae3

Browse files
committed
Merge branch 'develop'
# Conflicts: # CHANGELOG.md # Gruntfile.js # README.md # bin/gren.js # docs/GithubReleaseNotes.html # docs/classes.list.html # docs/github-info.js.html # docs/global.html # docs/gren.js.html # docs/index.html # docs/quicksearch.html # docs/utils.js.html # github-release-notes.js # package.json # src/gren.js # src/utils.js # test/utils.js
2 parents ca15fe5 + 7990c8b commit f18fae3

20 files changed

+991
-411
lines changed

.grenrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ignoreIssuesWith": [
3+
"duplicate",
4+
"wontfix"
5+
]
6+
}

CHANGELOG.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,3 @@
6868
## v0.1.0 (12/11/2015)
6969

7070
*No changelog for this release.*
71-
---
72-
73-
## 0.4.0 (03/03/2016)
74-
75-
- [**enhancement**] Include Various Types Of Commit Messages [#5](https://github.com/github-tools/github-release-notes/issues/5)
76-
77-
---
78-
79-
## v0.3.2 (07/12/2015)
80-
81-
- [**enhancement**] Cleanse option [#3](https://github.com/github-tools/github-release-notes/issues/3)
82-
83-
---
84-
85-
## v0.1.0 (12/11/2015)
86-
87-
*No changelog for this release.*

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ module.exports = function(grunt) {
3232
}
3333
});
3434

35-
grunt.registerTask('ship', ['eslint', 'jsdoc']);
3635
grunt.registerTask('test', ['eslint', 'nodeunit']);
36+
grunt.registerTask('ship', ['test', 'jsdoc']);
3737
};

README.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
[![npm version](https://badge.fury.io/js/github-release-notes.svg)](https://badge.fury.io/js/github-release-notes)
44
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)
5-
[![Build Status](https://travis-ci.org/github-tools/github-release-notes.svg)](https://travis-ci.org/github-tools/github-release-notes)
5+
[![Build Status](https://travis-ci.org/github-tools/github-release-notes.svg?branch=master)](https://travis-ci.org/github-tools/github-release-notes)
6+
[![Join the chat at https://gitter.im/github-release-notes/Lobby](https://badges.gitter.im/github-release-notes/Lobby.svg)](https://gitter.im/github-release-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
67

78
> Node module that generates release notes based on commit messages or closed issues between tags. It also can create a full changelog or add the latest release notes to the existing changelog file.
89
@@ -59,7 +60,9 @@ The module will look for the last tag, get all the issues closed in the time bet
5960
Following the options for the module:
6061

6162
- `--action=release|changelog` The **gren** action to run. Default: `release` _(see details below for changelog generator)_
62-
- `--tags=0.1.0|0.2.0,0.1.0` A specific tag or the range of tags to build the release notes from.
63+
- `--tags=0.1.0|0.2.0,0.1.0|all` A specific tag or the range of tags to build the release notes from. You can also specify `all` to write all releases. _(To override existing releases use the --override flag)_
64+
- `--ignore-labels=wont_fix|wont_fix,duplicate` One or more labels to ignore in the output. Default: `false` _(it will still output the issue, just without the specified labels)_
65+
- `--ignore-issues-with=wont_fix|wont_fix,duplicate` Ignore issues that contains one of the specified labels. Default: `false`
6366
- `--time-wrap=latest|history` The release notes you want to include in the changelog. Default: `latest` _Only applicable to the `changelog` action_
6467
- `--changelog-filename=CHANGELOG.md` The name of the changelog file. Default: `CHANGELOG.md`
6568
- `--data-source=issues|commits` The informations you want to use to build release notes. Default: `issues`
@@ -69,6 +72,55 @@ Following the options for the module:
6972
- `--include-messages=merges|commits|all` used to filter the messages added to the release notes. Default: `commits`
7073
- `--override=true|false` Override the release notes if existing. Default: `false`
7174

75+
### Config file
76+
77+
You can create a configuration file where the task will be ran, where to specify your options.
78+
The options in the file would be camelCase *e.g*:
79+
80+
```json
81+
{
82+
"action": "release",
83+
"timeWrap": "history",
84+
"dataSource": "commits",
85+
"ignoreIssuesWith": [
86+
"wontfix",
87+
"duplicate"
88+
]
89+
}
90+
```
91+
92+
The accepted file extensions are the following:
93+
94+
- `.grenrc`
95+
- `.grenrc.json`
96+
- `.grenrc.yml`
97+
- `.grenrc.yaml`
98+
- `.grenrc.js`
99+
100+
#### Templates
101+
102+
You can configure the output of **gren** using templates. Set your own configuration inside the config file, which will be merged with the defaults, shown below:
103+
104+
```json
105+
{
106+
"template": {
107+
"commit": "- {{message}}",
108+
"issue": "- {{labels}} {{name}} {{link}}",
109+
"issueInfo": {
110+
"labels": "{{labels}}",
111+
"label": "[**{{label}}**]",
112+
"name": "{{name}}",
113+
"link": "[{{text}}]({{url}})"
114+
},
115+
"release": "## {{release}} {{date}}",
116+
"releaseInfo": {
117+
"release": "{{release}}",
118+
"date": "({{date}})"
119+
}
120+
}
121+
}
122+
```
123+
72124
## Examples
73125

74126
The ways to use **gren** are various.
@@ -108,6 +160,14 @@ If you want then to override, simple use:
108160
gren --override --tags=0.3.0
109161
```
110162

163+
### Write all existing tags
164+
165+
You can run the task to generate release notes for all existing tags.
166+
Releases that already exist will be skipped. To override them, use the flag `--override`
167+
168+
```
169+
gren --override --tags=all
170+
```
111171

112172
## Changelog Generator
113173

@@ -134,7 +194,15 @@ If you want to override the existing changelog, use `--override`.
134194
The usage would then be:
135195

136196
```
137-
gren --time-wrap=history --override
197+
gren --action=changelog --time-wrap=history --override
138198
```
139199

140200
To see a full example of the changelog here [CHANGELOG.md](https://github.com/github-tools/github-release-notes/blob/develop/CHANGELOG.md)
201+
202+
---
203+
204+
## JavaScript documentation
205+
206+
Find the full documentation for JavaScript function here: [http://github-tools.github.io/github-release-notes/](http://github-tools.github.io/github-release-notes/)
207+
208+
Find

bin/gren.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
11
#!/usr/bin/env node
22

3-
'use strict';
4-
5-
var GithubReleaseNotes = require('../src/gren');
6-
var gren = new GithubReleaseNotes();
7-
var utils = require('../src/utils');
8-
9-
var action = utils.getBashOptions(process.argv)['action'];
10-
11-
gren.init()
12-
.then(function (success) {
13-
if(success) {
14-
return gren[action || 'release']();
15-
}
16-
});
3+
require('../github-release-notes');

docs/GithubReleaseNotes.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<li class="dropdown">
4141
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
4242
<ul class="dropdown-menu ">
43-
<li><a href="global.html#dashToCamelCase">dashToCamelCase</a></li><li><a href="global.html#formatDate">formatDate</a></li><li><a href="global.html#getBashOptions">getBashOptions</a></li><li><a href="global.html#isInRange">isInRange</a></li><li><a href="global.html#printTask">printTask</a></li><li><a href="global.html#repo">repo</a></li><li><a href="global.html#task">task</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#user">user</a></li>
43+
<li><a href="global.html#clearTasks">clearTasks</a></li><li><a href="global.html#convertStringToArray">convertStringToArray</a></li><li><a href="global.html#dashToCamelCase">dashToCamelCase</a></li><li><a href="global.html#formatDate">formatDate</a></li><li><a href="global.html#getBashOptions">getBashOptions</a></li><li><a href="global.html#isInRange">isInRange</a></li><li><a href="global.html#printTask">printTask</a></li><li><a href="global.html#repo">repo</a></li><li><a href="global.html#task">task</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#user">user</a></li>
4444
</ul>
4545
</li>
4646

@@ -211,7 +211,7 @@ <h5>Parameters:</h5>
211211
<ul class="dummy">
212212
<li>
213213
<a href="gren.js.html">gren.js</a>,
214-
<a href="gren.js.html#sunlight-1-line-770">line 770</a>
214+
<a href="gren.js.html#sunlight-1-line-783">line 783</a>
215215
</li>
216216
</ul>
217217
</dd>
@@ -519,7 +519,7 @@ <h5>Parameters:</h5>
519519
<ul class="dummy">
520520
<li>
521521
<a href="gren.js.html">gren.js</a>,
522-
<a href="gren.js.html#sunlight-1-line-789">line 789</a>
522+
<a href="gren.js.html#sunlight-1-line-804">line 804</a>
523523
</li>
524524
</ul>
525525
</dd>
@@ -638,7 +638,7 @@ <h4 class="name" id="release"><span class="type-signature"></span>release()</h4>
638638
<ul class="dummy">
639639
<li>
640640
<a href="gren.js.html">gren.js</a>,
641-
<a href="gren.js.html#sunlight-1-line-829">line 829</a>
641+
<a href="gren.js.html#sunlight-1-line-837">line 837</a>
642642
</li>
643643
</ul>
644644
</dd>

docs/classes.list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<li class="dropdown">
4141
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
4242
<ul class="dropdown-menu ">
43-
<li><a href="global.html#dashToCamelCase">dashToCamelCase</a></li><li><a href="global.html#formatDate">formatDate</a></li><li><a href="global.html#getBashOptions">getBashOptions</a></li><li><a href="global.html#isInRange">isInRange</a></li><li><a href="global.html#printTask">printTask</a></li><li><a href="global.html#repo">repo</a></li><li><a href="global.html#task">task</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#user">user</a></li>
43+
<li><a href="global.html#clearTasks">clearTasks</a></li><li><a href="global.html#convertStringToArray">convertStringToArray</a></li><li><a href="global.html#dashToCamelCase">dashToCamelCase</a></li><li><a href="global.html#formatDate">formatDate</a></li><li><a href="global.html#getBashOptions">getBashOptions</a></li><li><a href="global.html#isInRange">isInRange</a></li><li><a href="global.html#printTask">printTask</a></li><li><a href="global.html#repo">repo</a></li><li><a href="global.html#task">task</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#user">user</a></li>
4444
</ul>
4545
</li>
4646

docs/github-info.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<li class="dropdown">
4141
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
4242
<ul class="dropdown-menu ">
43-
<li><a href="global.html#dashToCamelCase">dashToCamelCase</a></li><li><a href="global.html#formatDate">formatDate</a></li><li><a href="global.html#getBashOptions">getBashOptions</a></li><li><a href="global.html#isInRange">isInRange</a></li><li><a href="global.html#printTask">printTask</a></li><li><a href="global.html#repo">repo</a></li><li><a href="global.html#task">task</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#user">user</a></li>
43+
<li><a href="global.html#clearTasks">clearTasks</a></li><li><a href="global.html#convertStringToArray">convertStringToArray</a></li><li><a href="global.html#dashToCamelCase">dashToCamelCase</a></li><li><a href="global.html#formatDate">formatDate</a></li><li><a href="global.html#getBashOptions">getBashOptions</a></li><li><a href="global.html#isInRange">isInRange</a></li><li><a href="global.html#printTask">printTask</a></li><li><a href="global.html#repo">repo</a></li><li><a href="global.html#task">task</a></li><li><a href="global.html#token">token</a></li><li><a href="global.html#user">user</a></li>
4444
</ul>
4545
</li>
4646

0 commit comments

Comments
 (0)