Skip to content

Commit

Permalink
Merge pull request #172 from Sonia-corporation/feature/contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
C0ZEN authored Feb 5, 2022
2 parents 1141b47 + c5a1886 commit abad7f7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,38 @@ Based on [conventional-changelog-angular](https://github.com/conventional-change

- Emojis in front of the section titles
- Display the commit's body
- Filter which type of commits should appear

### Filtering which type of commits should appear

You can define which type of commit should appear in your changelog.
To do that, pass the `types` option to the `presetConfig` with the list of commit types.

**Example:**

```
[
"@semantic-release/release-notes-generator",
{
"config": "@sonia-corporation/conventional-changelog",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"writerOpts": {
"commitsSort": ["subject", "scope"],
"owner": "C0ZEN"
},
"linkCompare": true,
"linkReferences": true,
"includeDetails": true,
"commit": "commit",
"issue": "issues",
"presetConfig": {
"types": ["feat", "fix", "perf", "docs", "revert"]
}
}
],
```

## Contributing

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"commitmsg": "cz-customizable-ghooks",
"cz": "git add . && git-cz && npm run git:push",
"semver": "semantic-release",
"semver:dry-run": "semantic-release --dry-run",
"commit": "npm run cz",
"git:push": "git push-upstream"
},
Expand Down
2 changes: 2 additions & 0 deletions writer-opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function getWriterOpts(config) {
let url = context.repository
? `${context.host}/${context.owner}/${context.repository}`
: context.repoUrl;

if (url) {
url = `${url}/issues/`;
// Issue URLs.
Expand All @@ -118,6 +119,7 @@ function getWriterOpts(config) {
return `[#${issue}](${url}${issue})`;
});
}

if (context.host) {
// User URLs.
commit.subject = commit.subject.replace(
Expand Down

0 comments on commit abad7f7

Please sign in to comment.