changelog-generator-default

module
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: MIT

README

📝 changelog-generator-default

CI Go Report Card PkgGoDev

The default changelog generator for go-semantic-release.

Output of the changelog

The changelog generator will order the types of commits in the changelog in the following order:

  • Breaking Changes
  • Feature
  • Bug Fixes
  • Reverts
  • Performance Improvements
  • Documentation
  • Tests
  • Code Refactoring
  • Styles
  • Chores
  • Build
  • CI

Emoji Changelogs

In order to use emoji changelogs including a prefixed emoji, you need to provide the following config when calling semantic-relase: --changelog-generator-opt "emojis=true". Or add the config within your .semrelrc file.

Example Change Log

Format Commit Template

The plugin allows to specify the template which is used to render commits with the --changelog-generator-opt CLI flag, e.g., --changelog-generator-opt "format_commit_template={{.Message}}". Or by adding the format_commit_template option within your .semrelrc file.

The following variables are available:

Variable Description
.SHA The commit SHA (e.g., c862ecee7682be648289579b515dbc03a5357c89).
.Type The type of the commit (e.g., feat, fix, chore, etc).
.Scope The scope of the commit.
.Message The first line of the commit message.
.Raw The raw commit message as a string array representing each line of the commit.
.Annotations A map containing different commit annotations like the author_name or author_email.

Additionally, the following functions are available:

Function Description
trimSHA Trims the SHA to the its first eight characters
Examples:
Template Example Output
* {{with .Scope -}} **{{.}}:** {{end}} {{- .Message}} ({{trimSHA .SHA}}) * **app:** commit message (12345678)
* {{with .Scope -}} **{{.}}:** {{end}} {{- .Message}} ({{trimSHA .SHA}}) {{- with index .Annotations "author_login" }} - by @{{.}} {{- end}} * **app:** commit message (12345678) - by @commit-author

Licence

The MIT License (MIT)

Copyright © 2020 Christoph Witzko

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL