You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://gitter.im/github-release-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
7
7
8
> 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.
8
9
@@ -59,7 +60,9 @@ The module will look for the last tag, get all the issues closed in the time bet
59
60
Following the options for the module:
60
61
61
62
-`--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`
63
66
-`--time-wrap=latest|history` The release notes you want to include in the changelog. Default: `latest`_Only applicable to the `changelog` action_
64
67
-`--changelog-filename=CHANGELOG.md` The name of the changelog file. Default: `CHANGELOG.md`
65
68
-`--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:
69
72
-`--include-messages=merges|commits|all` used to filter the messages added to the release notes. Default: `commits`
70
73
-`--override=true|false` Override the release notes if existing. Default: `false`
71
74
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
+
72
124
## Examples
73
125
74
126
The ways to use **gren** are various.
@@ -108,6 +160,14 @@ If you want then to override, simple use:
108
160
gren --override --tags=0.3.0
109
161
```
110
162
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
+
```
111
171
112
172
## Changelog Generator
113
173
@@ -134,7 +194,15 @@ If you want to override the existing changelog, use `--override`.
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/)
0 commit comments