Skip to content

Instantly share code, notes, and snippets.

@adoyle-h
Last active February 23, 2023 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adoyle-h/9d466c80bf419ceba278316198eb5690 to your computer and use it in GitHub Desktop.
Save adoyle-h/9d466c80bf419ceba278316198eb5690 to your computer and use it in GitHub Desktop.
CHANGELOG.md

[Unreleased]

[Full Changes]({{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD)

{{ range .Versions }}

{{ .Tag.Name }} ({{ datetime "2006-01-02 15:04:05 -07:00" .Tag.Date }})

{{ if .Tag.Previous -}} [Full Changes]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}) {{ end }}

{{- if .NoteGroups }}

Breaking Changes

{{- $noteIdx := 0 -}} {{- range .NoteGroups }}{{ range .Notes }} {{- $noteIdx = add $noteIdx 1 -}} {{ end }} {{ end }} Have {{ $noteIdx }} breaking changes. Check below logs with ⚠️ . {{ end }}

{{- range .CommitGroups }}

{{ .Title }}

{{ range .Commits -}}

  • {{ if .Notes }}⚠️ {{ end }}{{ if .Scope }}{{ .Scope }}: {{ end }} {{- regexReplaceAll "([^`])(<.*>)([^`])" .Subject "$1$2$3" }} ({{.Hash.Short}}) {{- if .Refs }} ({{ range .Refs }}[#{{ .Ref }}]({{$.Info.RepositoryURL}}/issues/{{ .Ref }}) {{- end }}){{- end }} {{- if not (empty .Body) }}

    {{ regexReplaceAll "\n" .Body "\n > " | abbrev 960 }}

{{- end }} {{ end }} {{- end -}}

{{- if .RevertCommits -}}

Reverts

{{ range .RevertCommits -}}

  • {{ .Revert.Header }} {{ end }} {{ end -}}

{{- if .MergeCommits -}}

Pull Requests

{{ range .MergeCommits -}}

  • {{ .Header }} {{ end }} {{ end -}} {{ end -}}
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/adoyle-h/makefile-utils
options:
tag_filter_pattern: '^v'
sort: "date"
commits:
filters:
Type:
- feat
- fix
- revert
- perf
- docs
sort_by: Scope
commit_groups:
group_by: Type
sort_by: Custom
title_order:
- feat
- fix
- revert
- perf
- docs
title_maps:
feat: New Features
fix: Bug Fixes
perf: Performance Improvements
docs: Document Changes
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?!?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
@adoyle-h
Copy link
Author

These files are templates for generating CHANGELOG.md by makefile-utils.

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