Skip to content

Commit abad7f7

Browse files
authored
Merge pull request #172 from Sonia-corporation/feature/contributors
2 parents 1141b47 + c5a1886 commit abad7f7

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,38 @@ Based on [conventional-changelog-angular](https://github.com/conventional-change
3232

3333
- Emojis in front of the section titles
3434
- Display the commit's body
35+
- Filter which type of commits should appear
36+
37+
### Filtering which type of commits should appear
38+
39+
You can define which type of commit should appear in your changelog.
40+
To do that, pass the `types` option to the `presetConfig` with the list of commit types.
41+
42+
**Example:**
43+
44+
```
45+
[
46+
"@semantic-release/release-notes-generator",
47+
{
48+
"config": "@sonia-corporation/conventional-changelog",
49+
"parserOpts": {
50+
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
51+
},
52+
"writerOpts": {
53+
"commitsSort": ["subject", "scope"],
54+
"owner": "C0ZEN"
55+
},
56+
"linkCompare": true,
57+
"linkReferences": true,
58+
"includeDetails": true,
59+
"commit": "commit",
60+
"issue": "issues",
61+
"presetConfig": {
62+
"types": ["feat", "fix", "perf", "docs", "revert"]
63+
}
64+
}
65+
],
66+
```
3567

3668
## Contributing
3769

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"commitmsg": "cz-customizable-ghooks",
7575
"cz": "git add . && git-cz && npm run git:push",
7676
"semver": "semantic-release",
77+
"semver:dry-run": "semantic-release --dry-run",
7778
"commit": "npm run cz",
7879
"git:push": "git push-upstream"
7980
},

writer-opts.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ function getWriterOpts(config) {
110110
let url = context.repository
111111
? `${context.host}/${context.owner}/${context.repository}`
112112
: context.repoUrl;
113+
113114
if (url) {
114115
url = `${url}/issues/`;
115116
// Issue URLs.
@@ -118,6 +119,7 @@ function getWriterOpts(config) {
118119
return `[#${issue}](${url}${issue})`;
119120
});
120121
}
122+
121123
if (context.host) {
122124
// User URLs.
123125
commit.subject = commit.subject.replace(

0 commit comments

Comments
 (0)