GitLab Changelog Tool
Automatically generate changelogs from merge requests on GitLab.
GitLab Changelog Tool automatically creates changelogs by analyzing merge requests that have been merged since the latest tag for a specific branch. It utilizes a customizable template to generate the changelogs.
Template variables:
tag_nametag_urltag_timestampfeaturesimprovementsbug_fixes
# Changelog
## [{{ tag_name }}]({{ tag_url }}) ({{ tag_timestamp.strftime('%Y-%m-%d') }})
{% if features %}
### New features
{% for feature in features %}
- {{ feature }}
{% endfor %}
{% endif %}
{% if improvements %}
### Improvements
{% for improvement in improvements %}
- {{ improvement }}
{% endfor %}
{% endif %}
{% if bug_fixes %}
### Bug fixes
{% for bug_fix in bug_fixes %}
- {{ bug_fix }}
{% endfor %}
{% endif %}
The tool determines the release version and notes by inspecting the titles and labels of the merge requests:
Scoped labels:
type::featuretype::improvementtype::bugfix
Basic labels:
breakingchange
If no merge requests are available, a feature release is generated based on the project description.
The versioning scheme follows the Semantic Versioning (SemVer) specification.
Prerequisites
Installation
Production
Install package:
pip install gitlab-changelog-tool
Development
Install package:
pip install -e .[development]
Note Use the
-e, --editableflag to install the package in development mode.
Note Set up a virtual environment for development.
Sort imports:
isort .
Format source code:
autopep8 --recursive --in-place .
Check static typing:
mypy .
Lint source code:
pylint setup.py gitlab_changelog_tool tests/
Test package:
pytest
Report test coverage:
pytest --cov
Hint See also the
Makefilefor development.
Usage
Generate changelog content:
gitlab-changelog-tool --project-id <project-id> generate
The command-line application will also retrieve configuration from specific environment variables:
CI_SERVER_URLGITLAB_ACCESS_TOKENCI_PROJECT_ID
Copyright and license
Copyright (c) 2023, Danilo Peixoto Ferreira. All rights reserved.
Project developed under BSD-3-Clause License.
Metadata
Release files for gitlab-changelog-tool 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitlab_changelog_tool-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for gitlab_changelog_tool-1.0.2-py3-none-any.whl |
Release files / gitlab_changelog_tool-1.0.2-py3-none-any.whl
| Download URL | gitlab_changelog_tool-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6666629b0f8a03db35764a0c81b280aaac22a87d69e39356e432109e3f7ab8c
|
|
BLAKE2b-256 checksum How to use checksums |
f3f45d769420961c1b5409749a07cf1521502186318f81d44892c250c33fba46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.16
|
Security for gitlab-changelog-tool 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.