Skip to content

Instantly share code, notes, and snippets.

@weiting-tw
Last active July 14, 2021 14:07
Show Gist options
  • Save weiting-tw/261142a23d68b97613cc1237534d8563 to your computer and use it in GitHub Desktop.
Save weiting-tw/261142a23d68b97613cc1237534d8563 to your computer and use it in GitHub Desktop.
auto-changelog template
# Changelog
{{#each releases}}
{{#if href}}
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
{{else}}
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
{{/if}}
{{#if summary}}
{{summary}}
{{/if}}
{{#if merges}}
### Merged
{{#each merges}}
- {{{message}}} {{#if href}}[`!{{id}}`]({{href}}){{/if}}
{{/each}}
{{/if}}
{{#if fixes}}
### Fixed
{{#each fixes}}
- {{{commit.subject}}}{{#each fixes}} {{#if href}}[`#{{id}}`]({{href}}){{/if}}{{/each}}
{{/each}}
{{/if}}
{{#commit-list commits heading='### Commits'}}
- {{#if breaking}}**Breaking change:** {{/if}}{{{subject}}} {{#if href}}[`{{shorthash}}`]({{href}}){{/if}}
{{/commit-list}}
{{/each}}
@weiting-tw
Copy link
Author

npx auto-changelog --template https://gist.githubusercontent.com/a26007565/261142a23d68b97613cc1237534d8563/raw/changelog.hbs --sort-commits date-desc --tag-pattern "^release.*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment