Skip to main content

Automatic Changelog generator using Jinja2 templates.

Project description

git-changelog

ci documentation pypi version gitpod gitter

Automatic Changelog generator using Jinja2 templates. From git logs to change logs.

Features

Installation

With pip:

pip install git-changelog

With pipx:

python3.7 -m pip install --user pipx
pipx install git-changelog

Usage (command-line)

usage: git-changelog [-b] [-h] [-i] [-g VERSION_REGEX] [-m MARKER_LINE]
                     [-o OUTPUT] [-R] [-c {angular,atom,conventional,basic}]
                     [-S SECTIONS [SECTIONS ...]]
                     [-t {angular,keepachangelog}] [-T] [-v]
                     [REPOSITORY]

Automatic Changelog generator using Jinja2 templates.

This tool parses your commit messages to extract useful data
that is then rendered using Jinja2 templates, for example to
a changelog file formatted in Markdown.

Each Git tag will be treated as a version of your project.
Each version contains a set of commits, and will be an entry
in your changelog. Commits in each version will be grouped
by sections, depending on the commit convention you follow.

BASIC CONVENTION

Default sections:
- add: Added
- fix: Fixed
- change: Changed
- remove: Removed

Additional sections:
- merge: Merged
- doc: Documented

ANGULAR CONVENTION

Default sections:
- feat: Features
- fix: Bug Fixes
- revert: Reverts
- ref, refactor: Code Refactoring
- perf: Performance Improvements

Additional sections:
- build: Build
- chore: Chore
- ci: Continuous Integration
- deps: Dependencies
- doc, docs: Docs
- style: Style
- test, tests: Tests

CONVENTIONALCOMMIT CONVENTION

Default sections:
- feat: Features
- fix: Bug Fixes
- revert: Reverts
- ref, refactor: Code Refactoring
- perf: Performance Improvements

Additional sections:
- build: Build
- chore: Chore
- ci: Continuous Integration
- deps: Dependencies
- doc, docs: Docs
- style: Style
- test, tests: Tests

positional arguments:
  REPOSITORY            The repository path, relative or absolute.

options:
  -b, --bump            Guess the new latest version by bumping the previous
                        one based on the set of unreleased commits. For
                        example, if a commit contains breaking changes, bump
                        the major number (or the minor number for 0.x
                        versions). Else if there are new features, bump the
                        minor number. Else just bump the patch number.
  -h, --help            Show this help message and exit.
  -i, --in-place        Insert new entries (versions missing from changelog)
                        in-place. An output file must be specified. With
                        custom templates, you can pass two additional
                        arguments: --version-regex and --marker-line. When
                        writing in-place, an 'in_place' variable will be
                        injected in the Jinja context, allowing to adapt the
                        generated contents (for example to skip changelog
                        headers or footers).
  -g, --version-regex VERSION_REGEX
                        A regular expression to match versions in the existing
                        changelog (used to find the latest release) when
                        writing in-place. The regular expression must be a
                        Python regex with a 'version' named group.
  -m, --marker-line MARKER_LINE
                        A marker line at which to insert new entries (versions
                        missing from changelog). If two marker lines are
                        present in the changelog, the contents between those
                        two lines will be overwritten (useful to update an
                        'Unreleased' entry for example).
  -o OUTPUT, --output OUTPUT
                        Output to given file. Default: stdout.
  -r, --parse-refs      Parse provider-specific references in commit
                        messages (GitHub/GitLab issues, PRs, etc.).
  -c, -s, --style, --commit-style,  --convention {angular,atom,conventional,basic}
                        The commit convention to match against. Default: basic.
  -S, --sections SECTIONS [SECTIONS ...]
                        The sections to render. See the available sections for
                        each supported convention in the description.
  -t, --template {angular,keepachangelog}
                        The Jinja2 template to use. Prefix with "path:" to
                        specify the path to a directory containing a file
                        named "changelog.md".
  -T, --trailers, --git-trailers
                        Parse Git trailers in the commit message. See
                        https://git-scm.com/docs/git-interpret-trailers.
  -v, --version         Show the current version of the program and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git-changelog-1.0.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

git_changelog-1.0.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file git-changelog-1.0.0.tar.gz.

File metadata

  • Download URL: git-changelog-1.0.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for git-changelog-1.0.0.tar.gz
Algorithm Hash digest
SHA256 13dcbcee5f7e939f5eaf54d7c2cbfa7ee56658a39eb2de1f79337fbfe4cab9ef
MD5 ffcf93fda08c7d508483bb29c1a652b7
BLAKE2b-256 16e5fc5a00bf5984a414b96dd2eac09134ee8af0cc03b86c3fb00e8d114b6adf

See more details on using hashes here.

File details

Details for the file git_changelog-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_changelog-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd95242dcb974e2f3331899a42eabfdcb4857fc03fee3f081674fdff6acc584e
MD5 353f00b355c51dc68401e36fbd8d0bc2
BLAKE2b-256 43091ab741aa636c8729a479d5ebf462c6d2396f7aa3f8db55bf5b656950490b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page