mscharl / changelog
A changelog generator inspired by the Gitlab CE tools.
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 2
Type:package
Requires
- symfony/config: ^4.0
- symfony/console: ^4.0
- symfony/process: ^4.0
- symfony/yaml: ^4.0
- tightenco/collect: ^6.1
- twig/twig: ^2.0
This package is auto-updated.
Last update: 2025-01-06 20:42:13 UTC
README
This package is inspired by the Gitlab changelog tools. It's stripped down to fit the workflow and requirements of most of my projects.
Creating a changelog entry
A new line for the changelog is created for each file found in your configured unreleased_dir
.
The file is created like this:
type: 'FEATURE' title: 'We added a new command to dynamically create changelog lines to avoid merge conflicts between feature branches.' ticket_id: 717 ticket_url: 'https://my-ticket.system/ticket/7f7241a2-b9ce-4218-9187-ddc58782ba37' merge_request_id: 6615 other: - 'POST DEPLOY: Enable the command in the Pipeline for the `develop` branch'
Installation
composer require mscharl/changelog
Add the configuration and entry template as required.
Configuration
To configure the generator you can put a .changelog.yaml
into you project root.
# The path to the changes file that will be generated. # Should be relative to the project root. changes_file: 'CHANGES.md' # The directory path where all unreleased entries are located. # Should be relative to the project root. unreleased_dir: 'changelog/unreleased' # Can be a path to a twig template or a string with placeholders. entry_template: '<changelog_package>/templates/entry.md.twig'
Entry Template
The Template is rendered by the Twig template engine.
In the config file you can configure either a string or path to a twig file. Both methods are handled the same way.
The entry files properties are passed as variables to Twig.
Note: You can't reference any external files within your entry template.