antsichaut automates ansible changelog generation from GitHub Pull Requests
Project description
Antsichaut
Antsichaut automates the filling of a changelog.yaml
used by antsibull-changelog.
You define a Github repository and a Github release. Then the script
searches all pull requests since the release and adds them to the changelog.yaml
.
The PR's get categorized into the changelog-sections based on these default labels:
group_config = [
{"title": "major_changes", "labels": ["major", "breaking"]},
{"title": "minor_changes", "labels": ["minor", "enhancement"]},
{"title": "breaking_changes", "labels": ["major", "breaking"]},
{"title": "deprecated_features", "labels": ["deprecated"]},
{"title": "removed_features", "labels": ["removed"]},
{"title": "security_fixes", "labels": ["security"]},
{"title": "bugfixes", "labels": ["bug", "bugfix"]},
{"title": "skip_changelog", "labels": ["skip_changelog"]},
]
This means for example that PR's with the label major
get categorized
into the major_changes
section of the changelog.
PR's that hace a skip_changelog
do not get added to the changelog at all.
PR's that do not have one of the above labels get categorized into the
trivial
section.
Installation
pip install antsichaut
Manual Usage
You need a minimal changelog.yml
created by antsibull-changelog:
antsibull-changelog release --version 1.17.0
Then define the version and the github repository you want to fetch the PRs from. Either via arguments or via environment variables:
> cd /path/to/your/ansible/collection
> antsichaut \
--github_token 123456789012345678901234567890abcdefabcd \
--since_version 1.17.0 \
--to_version 1.18.0 \
--major_changes_labels=foo
--major_changes_labels=bar
--minor_changes_labels=baz
--repository=T-Systems-MMS/ansible-collection-icinga-director
> cd /path/to/your/ansible/collection
> export SINCE_VERSION=1.17.0 # (or `latest`)
> export TO_VERSION=1.18.0 # optional. if unset, defaults to current date
> export REPOSITORY=T-Systems-MMS/ansible-collection-icinga-director
> export MAJOR_CHANGES_LABELS=["foo","bar"]
> export MINOR_CHANGES_LABELS=["baz"]
> antsichaut
This will fill the changelog.yaml
with Pull Requests.
Then run antsibull-changelog generate
to create the final changelog.
Usage with Github Actions
Check this example out.
Acknowledgements and Kudos
This script was initially forked from https://github.com/saadmk11/changelog-ci/ and modified to suit my needs. Thank you, @saadmk11!
License
The code in this project is released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file antsichaut-0.3.7.tar.gz
.
File metadata
- Download URL: antsichaut-0.3.7.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a9aef8d34b4b71a765ecded9861bb63263c292d397f7421553ada8f000a087 |
|
MD5 | 2c7ac032fcc1d672965788ebc8e95222 |
|
BLAKE2b-256 | c98bd240779908fa5f66ba53ae5a732ebe60d132e8b839c850601210f7dd1266 |
File details
Details for the file antsichaut-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: antsichaut-0.3.7-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb30cbe9c057eaa633680fef0716aab3408b34124e88b97171a91e0383f7c77e |
|
MD5 | af4738492b542e5d8ebdcd01df78460f |
|
BLAKE2b-256 | 05f2a439360735ed9ebf150259645e36927b7e33ba07340c584fbeee600d0e16 |