[DEPRECATED] CHANGELOG generator implemented in Go (Golang) -> Use now the actively maintained git-cliff
[DEPRECATED] CHANGELOG generator implemented in Go (Golang) -> Use now the actively maintained git-cliff
CHANGELOG generator implemented in Go (Golang). Anytime, anywhere, Write your CHANGELOG.
$ git-chglog.git-chglog internally uses the git command to get data to include in the
CHANGELOG. The basic steps are as follows.
tagA and tagB.We will start with installation and introduce the steps up to the automatic generation of the configuration file and template.
Please install git-chglog in a way that matches your environment.
brew tap git-chglog/git-chglog
brew install git-chglogscoop install git-chglogasdf plugin-add git-chglog https://github.com/GoodwayGroup/asdf-git-chglog.git
asdf install git-chglog latestgo install github.com/git-chglog/git-chglog/cmd/git-chglog@latestThe compiled docker images are maintained on quay.io. We maintain the following tags:
edge: Image that is build from the current HEAD of the main line branch.latest: Image that is built from the latest released versionx.y.y (versions): Images that are build from the tagged versions within Github.docker pull quay.io/git-chglog/git-chglog:latest
docker run -v "$PWD":/workdir quay.io/git-chglog/git-chglog --versionIf you are using another platform, you can download a binary from the [releases page]
and place it in a directory in your $PATH.
You can check with the following command whether the git-chglog command was
included in a directory that is in your $PATH.
$ git-chglog --version
# outputs the git-chglog versiongit-chglog requires configuration files and templates to generate a CHANGELOG.
However, it is a waste of time to create configuration files and templates from scratch.
Therefore we recommend using the --init option which will create them interactively :+1:
git-chglog --initYou are now ready for configuration files and templates!
Let's immediately generate a CHANGELOG of your project. By doing the following simple command, Markdown for your CHANGELOG is displayed on stdout.
git-chglogUse -o (--output) option if you want to output to a file instead of stdout.
git-chglog -o CHANGELOG.mdYou now know basic usage of git-chglog!
In order to make a better CHANGELOG, please refer to the following document and customize it.
…tag queryYou can specify which commits to include in the generation of CHANGELOG using <tag query>.
The table below shows Query patterns and summaries, and Query examples.
| Query | Description | Example |
|---|---|---|
<old>..<new> |
Commit contained in <new> tags from <old>. |
$ git-chglog 1.0.0..2.0.0 |
<name>.. |
Commit from the <name> to the latest tag. |
$ git-chglog 1.0.0.. |
..<name> |
Commit from the oldest tag to <name>. |
$ git-chglog ..2.0.0 |
<name> |
Commit contained in <name>. |
$ git-chglog 1.0.0 |
The git-chglog configuration is a yaml file. The default location is
.chglog/config.yml.
Below is a complete list that you can use with git-chglog.
…binGit execution command.
| Required | Type | Default | Description |
|---|---|---|---|
| N | String | "git" |
- |
styleCHANGELOG style. Automatic linking of issues and notices, initial value setting such as merges etc. are done automatically.
| Required | Type | Default | Description |
|---|---|---|---|
| N | String | "none" |
Should be "github" "gitlab" "bitbucket" "none" |
templatePath for the template file. It is specified by a relative path from the setting file. Absolute paths are also ok.
| Required | Type | Default | Description |
|---|---|---|---|
| N | String | "CHANGELOG.tpl.md" |
- |
infoMetadata for CHANGELOG. Depending on Style, it is sometimes used in processing, so it is recommended to specify it.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
title |
N | String | "CHANGELOG" |
Title of CHANGELOG. |
repository_url |
N | String | none | URL of git repository. |
optionsOptions used to process commits.
options.sortOptions concerning the acquisition and sort of commits.
| Required | Type | Default | Description |
|---|---|---|---|
| N | String | "date" |
Defines how tags are sorted in the generated change log. Values: "date", "semver". |
options.commitsOptions concerning the acquisition and sort of commits.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
filters |
N | Map in List | none | Filter by using Commit properties and values. Filtering is not done by specifying an empty value. |
sort_by |
N | String | "Scope" |
Property name to use for sorting Commit. See [Commit]. |
options.commit_groupsOptions for groups of commits.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
group_by |
N | String | "Type" |
Property name of Commit to be grouped into CommitGroup. See [CommitGroup][doc-commit]. |
sort_by |
N | String | "Title" |
Property name to use for sorting CommitGroup. See [CommitGroup][doc-commit-group]. |
title_order |
N | List | none | Predefined order of titles to use for sorting CommitGroup. Only if sort_by is Custom |
title_maps |
N | Map in List | none | Map for CommitGroup title conversion. |
options.headerThis option is used for parsing the commit header.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
pattern |
Y | String | none | A regular expression to use for parsing the commit header. |
pattern_maps |
Y | List | none | A rule for mapping the result of HeaderPattern to the property of Commit. See [Commit][doc-commit]. |
options.issuesThis option is used to detect issues.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
prefix |
N | List | none | Prefix used for issues. (e.g. #, #gh-) |
options.refsThis option is for parsing references.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
actions |
N | List | none | Word list of Ref.Action. See [Ref][doc-ref]. |
options.mergesOptions to detect and parse merge commits.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
pattern |
N | String | none | Similar to options.header.pattern. |
pattern_maps |
N | List | none | Similar to options.header.pattern_maps. |
options.revertsOptions to detect and parse revert commits.
| Key | Required | Type | Default | Description |
|---|---|---|---|---|
pattern |
N | String | none | Similar to options.header.pattern. |
pattern_maps |
N | List | none | Similar to options.header.pattern_maps. |
options.notesOptions to detect notes contained
No open issues yet, or sync has not completed.