Skip to main content

antsichaut automates ansible changelog generation from GitHub Pull Requests

Project description

Antsichaut

This is a very rough first try at automating the parts of creating 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 labels and according to this configuration (currently hardcoded):

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"]},
]

This means for example that PR's with the label major get categorized into the major_changes section of the changelog.

PR's that do not have one of the above labels get categorized into the trivial section.

Installation

Install the requirements:

pip install -r requirements.txt

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:

> python3 antsi_change_pr_getter.py --github_token 123456789012345678901234567890abcdefabcd --since_version 1.17.0 --to_version 1.18.0 --github_repository=T-Systems-MMS/ansible-collection-icinga-director
export SINCE_VERSION=1.17.0  # (or `latest`)
export TO_VERSION=1.18.0     # optional. if unset, defaults to current date
export GITHUB_REPOSITORY=T-Systems-MMS/ansible-collection-icinga-director

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


Download files

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

Source Distribution

antsichaut-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

antsichaut-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file antsichaut-0.1.1.tar.gz.

File metadata

  • Download URL: antsichaut-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Linux/4.4.0-18362-Microsoft

File hashes

Hashes for antsichaut-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f70e15de8b0a25917dff0e6050cc6f1119e9873aec845fefbccbcfe4ceb0286b
MD5 cb2d05d94a6fdefeb64715a31d5abb9d
BLAKE2b-256 d0084a0a9822fc0d928caf02e89afd73fdb74b7101c4bc22e9efc3c527793e67

See more details on using hashes here.

File details

Details for the file antsichaut-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: antsichaut-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Linux/4.4.0-18362-Microsoft

File hashes

Hashes for antsichaut-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c91c2f970c1eb280f2bd00b98ef5a8ee8b4523bb77ad33d8aff7ca63bde484d
MD5 78ef66b9a317163990b1e1f41aa96775
BLAKE2b-256 843bfac40529aeeb2c7378d4c72d4c7e2aad3e93dab2aea7e62a6fa2a71f4522

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