Skip to main content

Generate a changelog file from a local git checkout

Project description

Generate Changelog

pre-commit.ci status codecov

Use your commit log to make a beautiful changelog file.

generate-changelog does what it says: it generates a full changelog, or updates an existing one. Git tags and commits are the inputs by which generate-changelog performs its task.

The primary goal of this tool was to provide the benefits of conventional commits without requiring a strict syntax. generate-changelog accomplishes this using configurable regular expressions or commit metadata matching. The thought is natural language is easier for developers to remember and requires less tooling to enforce.

Features

Commit and tag processing

  • Filter out commits and tags based on regular expression matching.
  • Classify commit messages into sections such as "New", "Fixes", and "Changes" using configurable regular expressions, metadata, or custom criteria.
  • Rewrite commit summary or commit body using pipelines of actions.
  • Extract parts of the commit summary or body into metadata available for templates and filters.
  • Built-in issue parsers for Jira, GitHub, Azure DevOps Board.
  • Built-in conventional commit parser

Changelog rendering

  • Templated using Jinja templates.
  • Each template has a large amount of metadata that allows linking to a commit, a version diff, and issue trackers.
  • Easily customize just the template you want.
  • Supports full or incremental changelog generation.

Release hints

  • Can use user-defined rules to suggest a release type for use in another part of your CI pipeline.

Git support

  • Supports your merge or rebase workflows and complicated git histories.
  • Supports of multi-authors for one commit through configurable trailers key values.
  • Built-in parser for turning trailers key values into metadata.

Requirements

Python 3.9 or higher.

Installation

$ pip install generate-changelog

Usage

Create a default configuration file.

$ generate-changelog --generate-config

This creates a file named .changelog-config.yaml. You can make changes to the default configuration.

Generate your changelog via:

$ generate-changelog

GitHub Action

Inputs

  • config_file Path to the config file if it is not one of the defaults.
  • starting_tag Starting tag to generate a changelog from. Default is to start from the last tag in the current change log.
  • skip_output_pipeline Do not generate or update the CHANGELOG, but still return the release hint.
  • branch_override Override the current branch for release hint decisions.

Outputs

  • release_hint The suggested release type for the current or branch_override branch.

Generated files

The changelog file is written based on the configuration and value of the branch_override input. This file is not added to your Git repo. You must add and commit it if you want to keep it.

Example usage

on: [push]

jobs:
  sample_job:
    runs-on: ubuntu-latest
    name: Just an example
    steps:
      - name: Generate changelog and release hint
        id: changelog
        uses: callowayproject/generate-changelog@v0
        with:
          config_file: .changelog-config.yaml
      - name: Use the release hint
        run: echo "The release hint was ${{ steps.changelog.outputs.release_hint }}"

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

generate_changelog-0.16.0.tar.gz (217.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

generate_changelog-0.16.0-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file generate_changelog-0.16.0.tar.gz.

File metadata

  • Download URL: generate_changelog-0.16.0.tar.gz
  • Upload date:
  • Size: 217.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for generate_changelog-0.16.0.tar.gz
Algorithm Hash digest
SHA256 0ff442713c256d2f38e09c546f70cf0af8ccd156eb65b0bbd3df9e4512367ae6
MD5 e9ce323acd7d5ca23063ee669c16067c
BLAKE2b-256 3e7b4e0426d916c27fa1852fc0afac978ebff6a496fc5d47685addfc9d491a4d

See more details on using hashes here.

File details

Details for the file generate_changelog-0.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for generate_changelog-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db9f8c53d9bc3303e58275ad3c6f6835800a657fa1988d6ea252ffc1ae1049f9
MD5 a5d32eb3fdcae5793852a8ab5e8db736
BLAKE2b-256 c90b58ec1d144522ecaca56604ce3d937e27e049ee9c372819f57b9d0acc2c97

See more details on using hashes here.

Supported by

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