Metadata-Version: 2.4
Name: generate_changelog
Version: 0.17.0
Summary: Generate a changelog file from a local git checkout
Project-URL: Homepage, https://github.com/callowayproject/generate_changelog
Project-URL: Documentation, https://callowayproject.github.io/generate-changelog/
Project-URL: Source, https://github.com/callowayproject/generate-changelog
Author-email: Corey Oordt <coreyoordt@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Corey Oordt
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: change,changelog,commit,git
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.9
Requires-Dist: click>=8.1.7
Requires-Dist: gitpython
Requires-Dist: jinja2
Requires-Dist: mdformat>=0.7.22
Requires-Dist: more-itertools
Requires-Dist: rich-click>=1.8.4
Requires-Dist: ruamel-yaml
Requires-Dist: typing-extensions; python_version < '3.10'
Description-Content-Type: text/markdown

# Generate Changelog

<!-- start badges -->
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/callowayproject/generate-changelog/master.svg)](https://results.pre-commit.ci/latest/github/callowayproject/generate-changelog/master)
[![codecov](https://codecov.io/gh/callowayproject/generate-changelog/branch/master/graph/badge.svg?token=IPRMV15D17)](https://codecov.io/gh/callowayproject/generate-changelog)

Use your commit log to make a beautiful changelog file.
<!-- end badges -->

- [Documentation](https://callowayproject.github.io/generate-changelog/)
- [GitHub](https://github.com/callowayproject/generate-changelog)

<!--start-->

`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](https://www.conventionalcommits.org/) 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](https://jinja.palletsprojects.com/en/3.0.x/) 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](https://git.wiki.kernel.org/index.php/CommitMessageConventions).
- Built-in parser for turning [trailers key values](https://zerokspot.com/weblog/2020/10/24/git-commit-messages-with-attributes/) into metadata.

## Requirements

Python 3.9 or higher.

## Installation

```bash
$ pip install generate-changelog
```

## Usage

Create a default configuration file.

```bash
$ generate-changelog --generate-config
```

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

Generate your changelog via:

```bash
$ 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

```yaml
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 }}"
```


<!--end-->
