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
In your project's Gruntfile, add a section named `gren` to the data object passed into `grunt.initConfig()`.
26
-
**`token`, `username` and `repo` are required.**
23
+
Before you can use it, you need to set up a couple of things.
24
+
25
+
### Github Informations
26
+
27
+
**gren** by default looks for your local git configuration to get the repo informations. This means you can run the command directly from the git repo folder.
28
+
29
+
Otherwise, you can run it from wherever and specify a different repo as target, with:
27
30
28
31
```js
29
-
gren: {
30
-
release: {
31
-
options: {
32
-
token:'GITHUB_TOKEN',
33
-
username:'GITHUB_USERNAME',
34
-
repo:'GITHUB_REPO_NAME'
35
-
}
36
-
}
32
+
options: {
33
+
username:USERNAME,
34
+
repo:REPO_NAME
35
+
}
36
+
```
37
+
38
+
#### Token
39
+
40
+
To work, **gren** needs a `github token` (that can be easily generated following [this link](https://help.github.com/articles/creating-an-access-token-for-command-line-use/)). _You only need "repo" scope._
41
+
42
+
Once generated, you can run the gren command with the token as variable:
43
+
44
+
```js
45
+
options: {
46
+
token:YOUR_TOKEN_HERE
37
47
}
38
48
```
39
49
40
-
To generate a github token, follow [this link](https://help.github.com/articles/creating-an-access-token-for-command-line-use/);
50
+
Or you can add it to your `~/.bash_profile` or `~/.zshrc`) as follows:
41
51
42
-
### Optionals
43
-
There are optional arguments such as:
52
+
```shell
53
+
export GREN_GITHUB_TOKEN=your_token_here
54
+
```
55
+
56
+
## Options
57
+
58
+
The options are the same as [github-release-notes](https://github.com/alexcanessa/github-release-notes), in camelCase:
59
+
60
+
-`tags: 0.1.0|0.2.0,0.1.0` A specific tag or the range of tags to build the release notes from.
61
+
-`timeWrap: latest|history` The release notes you want to include in the changelog. Default: `latest`_Only applicable to the `changelog` action_
62
+
-`changelogFilename: CHANGELOG.md` The name of the changelog file. Default: `CHANGELOG.md`
63
+
-`dataSource: issues|commits` The informations you want to use to build release notes. Default: `issues`
64
+
-`draft: true|false` To set the release as a draft. Default: `false`
65
+
-`prerelease: true|false` To set the release as a prerelease. Default: `false`
66
+
-`prefix: v` Add a prefix to the tag version `e.g. v1.0.1`. Default: `null`
67
+
-`includeMessages: merges|commits|all` used to filter the messages added to the release notes. Default: `commits`
68
+
-`override: true|false` Override the release notes if existing. Default: `false`
69
+
70
+
### Example
44
71
45
-
-`draft: true` To set the release as a draft. Default: `false`
46
-
-`prerelease: true` To set the release as a prerelease. Default: `false`
47
-
-`prefix: 'v'` Add a prefix to the tag version `e.g. v1.0.1`.
48
-
-`force: true` Doesn't fail the task if the task presents any errors. Default: `false`
49
-
-`includeMessages: merges/commits/all` used to filter the messages added to the release notes. Default: `commits`
72
+
The module accepts two targets: *release* and *changelog*.
73
+
74
+
The *release* task will generate the last release, while the *changelog* will add the release notes to the changelog (without committing the file);
0 commit comments