{"id":13451620,"url":"https://github.com/git-chglog/git-chglog","last_synced_at":"2025-05-13T16:11:06.456Z","repository":{"id":37403056,"uuid":"119988223","full_name":"git-chglog/git-chglog","owner":"git-chglog","description":"CHANGELOG generator implemented in Go (Golang).","archived":false,"fork":false,"pushed_at":"2025-05-07T22:44:02.000Z","size":2864,"stargazers_count":2783,"open_issues_count":109,"forks_count":232,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-07T23:28:54.693Z","etag":null,"topics":["changelog","cli","command-line-tool","git","git-chglog","github","gitlab","go","golang","golang-package","jira","keep-a-changelog"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/git-chglog/git-chglog","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-chglog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-02T13:57:20.000Z","updated_at":"2025-05-06T22:28:41.000Z","dependencies_parsed_at":"2024-01-13T22:22:54.943Z","dependency_job_id":"1298413a-336e-47e9-9421-2beb8563ff06","html_url":"https://github.com/git-chglog/git-chglog","commit_stats":{"total_commits":206,"total_committers":32,"mean_commits":6.4375,"dds":0.5436893203883495,"last_synced_commit":"6a6993d52d69f1e3bb9c27ac61a4b6b247c24a3d"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-chglog%2Fgit-chglog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-chglog%2Fgit-chglog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-chglog%2Fgit-chglog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-chglog%2Fgit-chglog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-chglog","download_url":"https://codeload.github.com/git-chglog/git-chglog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253980055,"owners_count":21994042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["changelog","cli","command-line-tool","git","git-chglog","github","gitlab","go","golang","golang-package","jira","keep-a-changelog"],"created_at":"2024-07-31T07:00:57.143Z","updated_at":"2025-05-13T16:11:06.381Z","avatar_url":"https://github.com/git-chglog.png","language":"Go","readme":"# git-chglog\n\n![git-chglog](https://raw.githubusercontent.com/git-chglog/artwork/master/repo-banner%402x.png)\n\n[![godoc.org](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/git-chglog/git-chglog)\n[![Actions Status](https://github.com/git-chglog/git-chglog/workflows/tests/badge.svg)](https://github.com/git-chglog/git-chglog/actions)\n[![Coverage Status](https://img.shields.io/coveralls/github/git-chglog/git-chglog.svg?style=flat-square)](https://coveralls.io/github/git-chglog/git-chglog?branch=master)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/git-chglog/git-chglog/blob/master/LICENSE)\n\n\u003e CHANGELOG generator implemented in Go (Golang).\n\u003e _Anytime, anywhere, Write your CHANGELOG._\n\n## Table of Contents\n\n- [git-chglog](#git-chglog)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [How it works](#how-it-works)\n  - [Getting Started](#getting-started)\n    - [Installation](#installation)\n      - [Homebrew (for macOS users)](#homebrew-for-macos-users)\n      - [Scoop (for Windows users)](#scoop-for-windows-users)\n      - [asdf](#asdf)\n      - [Go users](#go-users)\n    - [Docker](#docker)\n    - [Test Installation](#test-installation)\n    - [Quick Start](#quick-start)\n  - [CLI Usage](#cli-usage)\n    - [`tag query`](#tag-query)\n  - [Configuration](#configuration)\n    - [`bin`](#bin)\n    - [`style`](#style)\n    - [`template`](#template)\n    - [`info`](#info)\n    - [`options`](#options)\n      - [`options.sort`](#optionssort)\n      - [`options.commits`](#optionscommits)\n      - [`options.commit_groups`](#optionscommit_groups)\n      - [`options.header`](#optionsheader)\n      - [`options.issues`](#optionsissues)\n      - [`options.refs`](#optionsrefs)\n      - [`options.merges`](#optionsmerges)\n      - [`options.reverts`](#optionsreverts)\n      - [`options.notes`](#optionsnotes)\n  - [Templates](#templates)\n  - [Supported Styles](#supported-styles)\n  - [Jira Integration](#jira-integration)\n    - [1. Change the header parse pattern to recognize Jira issue id in the configure file](#1-change-the-header-parse-pattern-to-recognize-jira-issue-id-in-the-configure-file)\n    - [2. Add Jira configuration to the configure file](#2-add-jira-configuration-to-the-configure-file)\n    - [3. Update the template to show Jira data](#3-update-the-template-to-show-jira-data)\n  - [FAQ](#faq)\n  - [TODO](#todo)\n  - [Thanks](#thanks)\n  - [Contributing](#contributing)\n  - [Development](#development)\n  - [Release Process](#release-process)\n  - [Feedback](#feedback)\n  - [CHANGELOG](#changelog)\n  - [Related Projects](#related-projects)\n  - [License](#license)\n\n## Features\n\n- :recycle: High portability\n  - It works with single binary. Therefore, any project (environment) can be used.\n- :beginner: Simple usability\n  - The CLI usage is very simple and has low learning costs.\n  - For example, the simplest command is `$ git-chglog`.\n- :rocket: High flexibility\n  - Commit message format and ...\n  - CHANGELOG's style (Template) and ...\n  - etc ...\n\n## How it works\n\n`git-chglog` internally uses the `git` command to get data to include in the\nCHANGELOG. The basic steps are as follows.\n\n1. Get all the tags.\n1. Get the commits contained between `tagA` and `tagB`.\n1. Execute with all tags corresponding to [tag query](#tag-query) that were specified in Step 1 and 2.\n\n## Getting Started\n\nWe will start with installation and introduce the steps up to the automatic generation\nof the configuration file and template.\n\n### Installation\n\nPlease install `git-chglog` in a way that matches your environment.\n\n#### [Homebrew](https://brew.sh) (for macOS users)\n\n```bash\nbrew tap git-chglog/git-chglog\nbrew install git-chglog\n```\n\n#### [Scoop](https://scoop.sh) (for Windows users)\n\n```bash\nscoop install git-chglog\n```\n\n#### [asdf](https://asdf-vm.com/)\n\n```bash\nasdf plugin-add git-chglog https://github.com/GoodwayGroup/asdf-git-chglog.git\nasdf install git-chglog latest\n```\n\n#### Go users\n\n```bash\ngo install github.com/git-chglog/git-chglog/cmd/git-chglog@latest\n```\n\n### [Docker](https://www.docker.com/)\nThe compiled docker images are maintained on [quay.io](https://quay.io/repository/git-chglog/git-chglog). \nWe maintain the following tags:\n- `edge`: Image that is build from the current `HEAD` of the main line branch.\n- `latest`: Image that is built from the [latest released version](https://github.com/git-chglog/git-chglog/releases)\n- `x.y.y` (versions): Images that are build from the tagged versions within Github.\n```bash\ndocker pull quay.io/git-chglog/git-chglog:latest\ndocker run -v \"$PWD\":/workdir quay.io/git-chglog/git-chglog --version\n```\n---\n\nIf you are using another platform, you can download a binary from the [releases page]\nand place it in a directory in your `$PATH`.\n\n### Test Installation\n\nYou can check with the following command whether the `git-chglog` command was\nincluded in a directory that is in your `$PATH`.\n\n```bash\n$ git-chglog --version\n# outputs the git-chglog version\n```\n\n### Quick Start\n\n`git-chglog` requires configuration files and templates to generate a CHANGELOG.\n\nHowever, it is a waste of time to create configuration files and templates from scratch.\n\nTherefore we recommend using the `--init` option which will create them interactively :+1:\n\n```bash\ngit-chglog --init\n```\n\n![init option demo](./docs/assets/init.gif)\n\n---\n\nYou are now ready for configuration files and templates!\n\nLet's immediately generate a CHANGELOG of your project.\nBy doing the following simple command, Markdown for your CHANGELOG is displayed\non stdout.\n\n```bash\ngit-chglog\n```\n\nUse `-o` (`--output`) option if you want to output to a file instead of stdout.\n\n```bash\ngit-chglog -o CHANGELOG.md\n```\n\n---\n\nYou now know basic usage of `git-chglog`!\n\nIn order to make a better CHANGELOG, please refer to the following document and\ncustomize it.\n\n## CLI Usage\n\n```bash\n$ git-chglog --help\n\nUSAGE:\n  git-chglog [options] \u003ctag query\u003e\n\n    There are the following specification methods for \u003ctag query\u003e.\n\n    1. \u003cold\u003e..\u003cnew\u003e - Commit contained in \u003cold\u003e tags from \u003cnew\u003e.\n    2. \u003cname\u003e..     - Commit from the \u003cname\u003e to the latest tag.\n    3. ..\u003cname\u003e     - Commit from the oldest tag to \u003cname\u003e.\n    4. \u003cname\u003e       - Commit contained in \u003cname\u003e.\n\nOPTIONS:\n  --init                      generate the git-chglog configuration file in interactive (default: false)\n  --path value                Filter commits by path(s). Can use multiple times.\n  --config value, -c value    specifies a different configuration file to pick up (default: \".chglog/config.yml\")\n  --template value, -t value  specifies a template file to pick up. If not specified, use the one in config\n  --repository-url value      specifies git repo URL. If not specified, use 'repository_url' in config\n  --output value, -o value    output path and filename for the changelogs. If not specified, output to stdout\n  --next-tag value            treat unreleased commits as specified tags (EXPERIMENTAL)\n  --silent                    disable stdout output (default: false)\n  --no-color                  disable color output (default: false) [$NO_COLOR]\n  --no-emoji                  disable emoji output (default: false) [$NO_EMOJI]\n  --no-case                   disable case sensitive filters (default: false)\n  --tag-filter-pattern value  Regular expression of tag filter. Is specified, only matched tags will be picked\n  --jira-url value            Jira URL [$JIRA_URL]\n  --jira-username value       Jira username [$JIRA_USERNAME]\n  --jira-token value          Jira token [$JIRA_TOKEN]\n  --sort value                Specify how to sort tags; currently supports \"date\" or by \"semver\" (default: date)\n  --help, -h                  show help (default: false)\n  --version, -v               print the version (default: false)\n\nEXAMPLE:\n\n  $ git-chglog\n\n    If \u003ctag query\u003e is not specified, it corresponds to all tags.\n    This is the simplest example.\n\n  $ git-chglog 1.0.0..2.0.0\n\n    The above is a command to generate CHANGELOG including commit of 1.0.0 to 2.0.0.\n\n  $ git-chglog 1.0.0\n\n    The above is a command to generate CHANGELOG including commit of only 1.0.0.\n\n  $ git-chglog $(git describe --tags $(git rev-list --tags --max-count=1))\n\n    The above is a command to generate CHANGELOG with the commit included in the latest tag.\n\n  $ git-chglog --output CHANGELOG.md\n\n    The above is a command to output to CHANGELOG.md instead of standard output.\n\n  $ git-chglog --config custom/dir/config.yml\n\n    The above is a command that uses a configuration file placed other than \".chglog/config.yml\".\n\n  $ git-chglog --path path/to/my/component --output CHANGELOG.component.md\n\n    Filter commits by specific paths or files in git and output to a component specific changelog.\n```\n\n### `tag query`\n\nYou can specify which commits to include in the generation of CHANGELOG using `\u003ctag query\u003e`.\n\nThe table below shows Query patterns and summaries, and Query examples.\n\n| Query          | Description                                    | Example                     |\n|:---------------|:-----------------------------------------------|:----------------------------|\n| `\u003cold\u003e..\u003cnew\u003e` | Commit contained in `\u003cnew\u003e` tags from `\u003cold\u003e`. | `$ git-chglog 1.0.0..2.0.0` |\n| `\u003cname\u003e..`     | Commit from the `\u003cname\u003e` to the latest tag.    | `$ git-chglog 1.0.0..`      |\n| `..\u003cname\u003e`     | Commit from the oldest tag to `\u003cname\u003e`.        | `$ git-chglog ..2.0.0`      |\n| `\u003cname\u003e`       | Commit contained in `\u003cname\u003e`.                  | `$ git-chglog 1.0.0`        |\n\n## Configuration\n\nThe `git-chglog` configuration is a yaml file. The default location is\n`.chglog/config.yml`.\n\nBelow is a complete list that you can use with `git-chglog`.\n\n```yaml\nbin: git\nstyle: \"\"\ntemplate: CHANGELOG.tpl.md\ninfo:\n  title: CHANGELOG\n  repository_url: https://github.com/git-chglog/git-chglog\n\noptions:\n  tag_filter_pattern: '^v'\n  sort: \"date\"\n\n  commits:\n    filters:\n      Type:\n        - feat\n    sort_by: Scope\n\n  commit_groups:\n    group_by: Type\n    sort_by: Title\n    title_order:\n      - feat\n    title_maps:\n      feat: Features\n\n  header:\n    pattern: \"\u003cregexp\u003e\"\n    pattern_maps:\n      - PropName\n\n  issues:\n    prefix:\n      - #\n\n  refs:\n    actions:\n      - Closes\n      - Fixes\n\n  merges:\n    pattern: \"^Merge branch '(\\\\w+)'$\"\n    pattern_maps:\n      - Source\n\n  reverts:\n    pattern: \"^Revert \\\"([\\\\s\\\\S]*)\\\"$\"\n    pattern_maps:\n      - Header\n\n  notes:\n    keywords:\n      - BREAKING CHANGE\n```\n\n### `bin`\n\nGit execution command.\n\n| Required | Type   | Default | Description |\n|:---------|:-------|:--------|:------------|\n| N        | String | `\"git\"` | -           |\n\n### `style`\n\nCHANGELOG style. Automatic linking of issues and notices, initial value setting\nsuch as merges etc. are done automatically.\n\n| Required | Type   | Default  | Description                                            |\n|:---------|:-------|:---------|:-------------------------------------------------------|\n| N        | String | `\"none\"` | Should be `\"github\"` `\"gitlab\"` `\"bitbucket\"` `\"none\"` |\n\n### `template`\n\nPath for the template file. It is specified by a relative path from the setting\nfile. Absolute paths are also ok.\n\n| Required | Type   | Default              | Description |\n|:---------|:-------|:---------------------|:------------|\n| N        | String | `\"CHANGELOG.tpl.md\"` | -           |\n\n### `info`\n\nMetadata for CHANGELOG. Depending on Style, it is sometimes used in processing,\nso it is recommended to specify it.\n\n| Key              | Required | Type   | Default       | Description            |\n|:-----------------|:---------|:-------|:--------------|:-----------------------|\n| `title`          | N        | String | `\"CHANGELOG\"` | Title of CHANGELOG.    |\n| `repository_url` | N        | String | none          | URL of git repository. |\n\n### `options`\n\nOptions used to process commits.\n\n#### `options.sort`\n\nOptions concerning the acquisition and sort of commits.\n\n| Required | Type        | Default   | Description                                                                                                         |\n|:---------|:------------|:----------|:--------------------------------------------------------------------------------------------------------------------|\n| N        | String      | `\"date\"` | Defines how tags are sorted in the generated change log. Values: \"date\", \"semver\". |\n\n#### `options.commits`\n\nOptions concerning the acquisition and sort of commits.\n\n| Key       | Required | Type        | Default   | Description                                                                                         |\n|:----------|:---------|:------------|:----------|:----------------------------------------------------------------------------------------------------|\n| `filters` | N        | Map in List | none      | Filter by using `Commit` properties and values. Filtering is not done by specifying an empty value. |\n| `sort_by` | N        | String      | `\"Scope\"` | Property name to use for sorting `Commit`. See [Commit].                                            |\n\n#### `options.commit_groups`\n\nOptions for groups of commits.\n\n| Key           | Required | Type        | Default   | Description                                                                                |\n|:--------------|:---------|:------------|:----------|:-------------------------------------------------------------------------------------------|\n| `group_by`    | N        | String      | `\"Type\"`  | Property name of `Commit` to be grouped into `CommitGroup`. See [CommitGroup][doc-commit]. |\n| `sort_by`     | N        | String      | `\"Title\"` | Property name to use for sorting `CommitGroup`. See [CommitGroup][doc-commit-group].       |\n| `title_order` | N        | List        | none      | Predefined order of titles to use for sorting `CommitGroup`. Only if `sort_by` is `Custom` |\n| `title_maps`  | N        | Map in List | none      | Map for `CommitGroup` title conversion.                                                    |\n\n#### `options.header`\n\nThis option is used for parsing the commit header.\n\n| Key            | Required | Type   | Default | Description                                                                                             |\n|:---------------|:---------|:-------|:--------|:--------------------------------------------------------------------------------------------------------|\n| `pattern`      | Y        | String | none    | A regular expression to use for parsing the commit header.                                              |\n| `pattern_maps` | Y        | List   | none    | A rule for mapping the result of `HeaderPattern` to the property of `Commit`. See [Commit][doc-commit]. |\n\n#### `options.issues`\n\nThis option is used to detect issues.\n\n| Key      | Required | Type | Default | Description                                |\n|:---------|:---------|:-----|:--------|:-------------------------------------------|\n| `prefix` | N        | List | none    | Prefix used for issues. (e.g. `#`, `#gh-`) |\n\n#### `options.refs`\n\nThis option is for parsing references.\n\n| Key       | Required | Type | Default | Description                                    |\n|:----------|:---------|:-----|:--------|:-----------------------------------------------|\n| `actions` | N        | List | none    | Word list of `Ref.Action`. See [Ref][doc-ref]. |\n\n#### `options.merges`\n\nOptions to detect and parse merge commits.\n\n| Key            | Required | Type   | Default | Description                               |\n|:---------------|:---------|:-------|:--------|:------------------------------------------|\n| `pattern`      | N        | String | none    | Similar to `options.header.pattern`.      |\n| `pattern_maps` | N        | List   | none    | Similar to `options.header.pattern_maps`. |\n\n#### `options.reverts`\n\nOptions to detect and parse revert commits.\n\n| Key            | Required | Type   | Default | Description                               |\n|:---------------|:---------|:-------|:--------|:------------------------------------------|\n| `pattern`      | N        | String | none    | Similar to `options.header.pattern`.      |\n| `pattern_maps` | N        | List   | none    | Similar to `options.header.pattern_maps`. |\n\n#### `options.notes`\n\nOptions to detect notes contained in commit bodies.\n\n| Key        | Required | Type | Default | Description                                                                                          |\n|:-----------|:---------|:-----|:--------|:-----------------------------------------------------------------------------------------------------|\n| `keywords` | N        | List | none    | Keyword list to find `Note`. A semicolon is a separator, like `\u003ckeyword\u003e:` (e.g. `BREAKING CHANGE`). |\n\n## Templates\n\nThe `git-chglog` template uses the `text/template` package and enhanced templating functions provided by [Sprig]. For basic usage please refer to the following.\n\n- [text/template](https://golang.org/pkg/text/template/)\n- [Sprig]\n\nWe have implemented the following custom template functions. These override functions provided by [Sprig].\n\n| Name         | Signature                                     | Description                                                                   |\n| :----------- | :-------------------------------------------- | :---------------------------------------------------------------------------- |\n| `contains`   | `func(s, substr string) bool`                 | Reports whether `substr` is within `s` using `strings.Contains`               |\n| `datetime`   | `func(layout string, input time.Time) string` | Generate a formatted Date string based on layout                              |\n| `hasPrefix`  | `func(s, prefix string) bool`                 | Tests whether the string `s` begins with `prefix` using `strings.HasPrefix`   |\n| `hasSuffix`  | `func(s, suffix string) bool`                 | Tests whether the string `s` ends with `suffix`. using `strings.HasPrefix`    |\n| `indent`     | `func(s string, n int) string`                | Indent all lines of `s` by `n` spaces                                         |\n| `replace`    | `func(s, old, new string, n int) string`      | Replace `old` with `new` within string `s`, `n` times using `strings.Replace` |\n| `upperFirst` | `func(s string) string`                       | Upper case the first character of a string                                    |\n\nIf you are not satisfied with the prepared template please try customizing one.\n\n---\n\nThe basic templates are as follows.\n\n**Example:**\n\n```markdown\n{{ if .Versions -}}\n\u003ca name=\"unreleased\"\u003e\u003c/a\u003e\n## [Unreleased]\n\n{{ if .Unreleased.CommitGroups -}}\n{{ range .Unreleased.CommitGroups -}}\n### {{ .Title }}\n{{ range .Commits -}}\n- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}\n{{ end }}\n{{ end -}}\n{{ end -}}\n{{ end -}}\n\n{{ range .Versions }}\n\u003ca name=\"{{ .Tag.Name }}\"\u003e\u003c/a\u003e\n## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime \"2006-01-02\" .Tag.Date }}\n{{ range .CommitGroups -}}\n### {{ .Title }}\n{{ range .Commits -}}\n- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}\n{{ end }}\n{{ end -}}\n\n{{- if .RevertCommits -}}\n### Reverts\n{{ range .RevertCommits -}}\n- {{ .Revert.Header }}\n{{ end }}\n{{ end -}}\n\n{{- if .MergeCommits -}}\n### Pull Requests\n{{ range .MergeCommits -}}\n- {{ .Header }}\n{{ end }}\n{{ end -}}\n\n{{- if .NoteGroups -}}\n{{ range .NoteGroups -}}\n### {{ .Title }}\n{{ range .Notes }}\n{{ .Body }}\n{{ end }}\n{{ end -}}\n{{ end -}}\n{{ end -}}\n\n{{- if .Versions }}\n[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD\n{{ range .Versions -}}\n{{ if .Tag.Previous -}}\n[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}\n{{ end -}}\n{{ end -}}\n{{ end -}}\n```\n\nSee the godoc [RenderData][doc-render-data] documentation for available variables.\n\n## Supported Styles\n\n| Name                                       | Status             | Features                                               |\n|:-------------------------------------------|:-------------------|:-------------------------------------------------------|\n| [GitHub](https://github.com/)              | :white_check_mark: | Mentions automatic link. Automatic link to references. |\n| [GitLab](https://about.gitlab.com/)        | :white_check_mark: | Mentions automatic link. Automatic link to references. |\n| [Bitbucket](https://bitbucket.org/product) | :white_check_mark: | Mentions automatic link. Automatic link to references. |\n\n\u003e :memo: Even with styles that are not yet supported, it is possible to make\nordinary CHANGELOG.\n\n## Jira Integration\n\nJira is a popular project management tool. When a project uses Jira to track\nfeature development and bug fixes, it may also want to generate change log based\ninformation stored in Jira. With embedding a Jira story id in git commit header,\nthe git-chglog tool may automatically fetch data of the story from Jira, those\ndata then can be used to render the template.\n\nTake the following steps to add Jira integration:\n\n### 1. Change the header parse pattern to recognize Jira issue id in the configure file\n\n__Where Jira issue is identical Jira story.__\n\nThe following is a sample pattern:\n\n  ```yaml\n  header:\n    pattern: \"^(?:(\\\\w*)|(?:\\\\[(.*)\\\\])?)\\\\:\\\\s(.*)$\"\n    pattern_maps:\n      - Type\n      - JiraIssueID\n      - Subject\n  ```\n\nThis sample pattern can match both forms of commit headers:\n\n- `feat: new feature of something`\n- `[JIRA-ID]: something`\n\n### 2. Add Jira configuration to the configure file\n\nThe following is a sample:\n\n  ```yaml\n  jira:\n    info:\n      username: u\n      token: p\n      url: https://jira.com\n    issue:\n      type_maps:\n        Task: fix\n        Story: feat\n      description_pattern: \"\u003cchangelog\u003e(.*)\u003c/changelog\u003e\"\n  ```\n\nHere you need to define Jira URL, access username and token (password). If you\ndon't want to write your Jira access credential in configure file, you may define\nthem with environment variables: `JIRA_URL`, `JIRA_USERNAME` and `JIRA_TOKEN`.\n\nYou also needs to define a issue type map. In above sample, Jira issue type `Task`\nwill be mapped to `fix` and `Story` will be mapped to `feat`.\n\nAs a Jira story's description could be very long, you might not want to include\nthe entire description into change log. In that case, you may define `description_pattern`\nlike above, so that only content embraced with `\u003cchangelog\u003e ... \u003c/changelog\u003e`\nwill be included.\n\n### 3. Update the template to show Jira data\n\nIn the template, if a commit contains a Jira issue id, then you may show Jira\ndata. For example:\n\n```markdown\n{{ range .CommitGroups -}}\n### {{ .Title }}\n{{ range .Commits -}}\n- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}\n{{ if .JiraIssue }} {{ .JiraIssue.Description }}\n{{ end }}\n{{ end }}\n{{ end -}}\n```\n\nWithin a `Commit`, the following Jira data can be used in template:\n\n- `.JiraIssue.Summary` - Summary of the Jira story\n- `.JiraIssue.Description` - Description of the Jira story\n- `.JiraIssue.Type` - Original type of the Jira story, and `.Type` will be mapped type.\n- `.JiraIssue.Labels` - A list of strings, each is a Jira label.\n\n## FAQ\n\n\u003cdetails\u003e\n  \u003csummary\u003eWhy do not you output files by default?\u003c/summary\u003e\n  This is not for the purpose of completely automating the generation of CHANGELOG\n  files, it is only for assisting generation.\n\n  It is ideal to describe everything included in CHANGELOG in your commits. But\n  actually it is very difficult to do it perfectly.\n\n  There are times when you need to edit the generated output to write a great CHANGELOG.\n\n  By displaying it on the standard output, it makes it easy to change the contents.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan I commit CHANGELOG changes before creating tags?\u003c/summary\u003e\n\n  Yes, it can be solved by using the `--next-tag` flag.\n\n  For example, let's say you want to upgrade your project to `2.0.0`.\n  You can create CHANGELOG containing `2.0.0` as follows.\n\n  ```bash\n  git-chglog --next-tag 2.0.0 -o CHANGELOG.md\n  git commit -am \"release 2.0.0\"\n  git tag 2.0.0\n  ```\n\n  The point to notice is that before actually creating a tag with `git`, it is\n  conveying the next version with `--next-tag` :+1:\n\n  This is a step that is necessary for project operation in many cases.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCan I generate a CHANGELOG based on certain tags?\u003c/summary\u003e\n\n  Yes, it can be solved by use the `--tag-filter-pattern` flag.\n\n  For example, the following command will only include tags starting with \"v\":\n\n  ```bash\n  git-chglog --tag-filter-pattern '^v'\n  ```\n\n\u003c/details\u003e\n\n## TODO\n\n- [x] Windows Support\n- [x] More styles (GitHub, GitLab, Bitbucket :tada:)\n- [ ] Snippetization of configuration files (improvement of reusability)\n- [ ] More test test test ... (and example)\n\n## Thanks\n\n`git-chglog` is inspired by [conventional-changelog]. Thank you!\n\n## Contributing\n\nWe always welcome your contributions :clap:\n\n## Development\n\n1. Use Golang version `\u003e= 1.24`\n1. Fork (https://github.com/git-chglog/git-chglog) :tada:\n1. Create a feature branch :coffee:\n1. Run test suite with the `$ make test` command and confirm that it passes :zap:\n1. Run linters with the `$ make lint` command and confirm it passes :broom:\n   - The project uses [golangci-lint]\n1. Commit your changes :memo:\n1. Rebase your local changes against the `master` branch :bulb:\n1. Create new Pull Request :love_letter:\n\nBugs, feature requests and comments are more than welcome in the [issues].\n\n## Release Process\n\nThere is a `release` target within the Makefile that wraps up the steps to\nrelease a new version.\n\n\u003e NOTE: Pass the `VERSION` variable when running the command to properly set\n\u003e the tag version for the release.\n\n```bash\n$ VERSION=vX.Y.Z make release\n# EXAMPLE:\n$ VERSION=v0.11.3 make release\n```\n\nOnce the `tag` has been pushed, the `goreleaser` github action will take care\nof the rest.\n\n## Feedback\n\nI would like to make `git-chglog` a better tool.\nThe goal is to be able to use in various projects.\n\nTherefore, your feedback is very useful.\nI am very happy to tell you your opinions on Issues and PR :heart:\n\n## CHANGELOG\n\nSee [CHANGELOG.md](./CHANGELOG.md)\n\n## Related Projects\n\n- [git-chglog/artwork] - Assets for `git-chglog`.\n\n## License\n\n[MIT © tsuyoshiwada](./LICENSE)\n\n[releases page]: https://github.com/git-chglog/git-chglog/releases\n[Commit]: https://godoc.org/github.com/git-chglog/git-chglog#Commit\n[doc-commit]: https://godoc.org/github.com/git-chglog/git-chglog#Commit\n[doc-commit-group]: https://godoc.org/github.com/git-chglog/git-chglog#CommitGroup\n[doc-ref]: https://godoc.org/github.com/git-chglog/git-chglog#Ref\n[doc-render-data]: https://godoc.org/github.com/git-chglog/git-chglog#RenderData\n[conventional-changelog]: https://github.com/conventional-changelog/conventional-changelog\n[golangci-lint]: https://golangci-lint.run/usage/install/#local-installation\n[issues]: https://github.com/git-chglog/git-chglog/issues\n[git-chglog/artwork]: https://github.com/git-chglog/artwork\n[Sprig]: http://masterminds.github.io/sprig\n","funding_links":[],"categories":["Go","开源类库","Git","Open source library","cli","Repositories"],"sub_categories":["Git","Snippets Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-chglog%2Fgit-chglog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-chglog%2Fgit-chglog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-chglog%2Fgit-chglog/lists"}