mscharl/changelog

A changelog generator inspired by the Gitlab CE tools.

1.1.0 2019-10-15 08:18 UTC

This package is auto-updated.

Last update: 2024-04-29 04:19:46 UTC


README

Work in Progress

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.