Skip to content

A small program that will generate a changelog from git repos using "conventional style" commit messages

License

Notifications You must be signed in to change notification settings

jcmendez-guerrero/auto-changelog-1

 
 

Repository files navigation

Auto Changelog

CI Pipeline PyPI PyPI - Python Version PyPI - License Code style - Black

A quick script that will generate a changelog for any git repository using conventional style commit messages.

Installation

Install and update using pip:

pip install auto-changelog

or directly from source(via poetry):

poetry install
poetry build
pip install dist/*.whl

Usage

You can list the command line options by running auto-changelog --help:

Usage: auto-changelog [OPTIONS]

Options:
  -p, --path-repo PATH       Path to the repository's root directory
                             [Default: .]

  -t, --title TEXT           The changelog's title [Default: Changelog]
  -d, --description TEXT     Your project's description
  -o, --output FILENAME      The place to save the generated changelog
                             [Default: CHANGELOG.md]

  -r, --remote TEXT          Specify git remote to use for links
  -v, --latest-version TEXT  use specified version as latest release
  -u, --unreleased           Include section for unreleased changes
  --template TEXT            specify template to use [compact] or a path to a
                             custom template, default: compact

  --diff-url TEXT            override url for compares, use {current} and
                             {previous} for tags

  --issue-url TEXT           Override url for issues, use {id} for issue id
  --issue-pattern TEXT       Override regex pattern for issues in commit
                             messages. Should contain two groups, original
                             match and ID used by issue-url.

  --tag-pattern TEXT         override regex pattern for release tags. By
                             default use semver tag names semantic. tag should
                             be contain in one group named 'version'.

  --tag-prefix TEXT          prefix used in version tags, default: ""
  --stdout
  --tag-pattern TEXT         Override regex pattern for release tags
  --starting-commit TEXT     Starting commit to use for changelog generation
  --stopping-commit TEXT     Stopping commit to use for changelog generation
  --debug                    set logging level to DEBUG
  --help                     Show this message and exit.

A simple example

Example usage of auto-changelog

Contributing

To setup development environment, you may use Poetry. These instructions will assume that you have already Poetry as well as GNU make locally installed on your development computer.

These instructions will assume that you have already poetry (https://python-poetry.org/) locally installed on your development computer.

  1. Fork the auto-changelog repo on GitHub.

  2. Clone your fork locally:

    $ git clone [email protected]:your_name_here/auto-changelog.git
    
  3. Initialize your local development environment of auto-changelog. This will include creating a virtualenv using poetry, installing dependencies and registering git hooks using pre-commit:

    $ cd auto-changelog/
    $ make init-dev
    
  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you're done making changes, check that your changes pass linting, formating, and the tests, including testing other Python versions with tox:

    $ make lint         # check style with flake8
    $ make format       # run autoformat with isort and black
    $ make test         # run tests quickly with the default Python
    $ make test-all     # run tests on every Python version with tox
    
  6. Commit your changes and push your branch to GitHub. Upon commit pre-commit will automatically run flake8 and black and report if changes have been made or need to be fixed by you:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  7. Submit a pull request through the GitHub website.

About

A small program that will generate a changelog from git repos using "conventional style" commit messages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.2%
  • Jinja 3.0%
  • Makefile 2.8%