Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto-changelog template file to be used directly from the repository #583

Merged
merged 1 commit into from
Jan 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/recipes/auto-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,17 @@ unreleased tag:
{{/if}}
{{/each}}
```

You can also use the template above [changelog-compact-template.hbs](./changelog-compact-template.hbs)
directly from the URL:

```json
{
"hooks": {
"before:release": "npx auto-changelog -p"
},
"git": {
"changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/master/docs/recipes/changelog-compact-template.hbs"
}
}
```
13 changes: 13 additions & 0 deletions docs/recipes/changelog-compact-template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{#each releases}}
{{#if @first}}
{{#each merges}}
- {{{message}}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}
{{/each}}
{{#each fixes}}
- {{{commit.subject}}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}}
{{/each}}
{{#each commits}}
- {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}}
{{/each}}
{{/if}}
{{/each}}