mscharl / changelog
受Gitlab CE工具启发的变更日志生成器。
1.1.0
2019-10-15 08:18 UTC
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: 2024-09-09 20:32:07 UTC
README
此包受Gitlab 变更日志工具的启发。它经过简化以适应我大多数项目的流程和需求。
创建变更日志条目
为配置的unreleased_dir
中找到的每个文件,在变更日志中创建一个新的条目。
文件创建如下
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'
安装
composer require mscharl/changelog
配置
要配置生成器,您可以在项目根目录中放置一个.changelog.yaml
文件。
# 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'
条目模板
模板由Twig模板引擎渲染。
在配置文件中,您可以配置字符串或指向twig文件的路径。两种方法处理方式相同。
将条目文件属性作为变量传递给Twig。
注意:您不能在条目模板中引用任何外部文件。