leviy/rmt-changelog-formatter

此包已被 废弃 并不再维护。作者建议使用 leviy/release-tool 包。
关于此包的最新版本(v1.0.1)没有提供任何许可证信息。

为 liip/rmt 定制的变更日志格式化程序,列出合并的拉取请求

v1.0.1 2018-03-21 14:18 UTC

This package is not auto-updated.

Last update: 2019-02-20 19:22:12 UTC


README

此 RMT 的变更日志格式化程序允许您根据合并的拉取请求自动生成和更新变更日志。

安装

composer require --dev leviy/rmt-changelog-formatter

配置

此变更日志格式化程序需要 Git 作为版本控制系统和 vcs-tag 版本持久化器。还建议配置 vcs-commit 预发布操作,在标记新版本之前提交变更日志,并添加 vcs-publish 发布后操作以推送它。

.rmt.yml 中添加一个 changelog-update 预发布操作,其中 format: pullRequest

vcs: git

version-generator: semantic
version-persister: vcs-tag

pre-release-actions:
  changelog-update:
    format: pullRequest
  vcs-commit: ~

post-release-actions:
  vcs-publish:
    ask-confirmation: true

GitHub

如果您正在使用 GitHub,将 repo 选项设置为自动配置拉取请求、比较和问题 URL。

pre-release-actions:
  changelog-update:
    format: pullRequest
    repo: leviy/rmt-changelog-formatter

JIRA

如果您使用 JIRA 作为问题跟踪系统,您可以配置此格式化程序自动检测并链接到您的 JIRA 问题。为此,请添加 issue-patternissue-url 选项。

pre-release-actions:
  changelog-update:
    format: pullRequest
    issue-pattern: '(JIR-[0-9]+)'
    issue-url: 'https://jira.example.com/browse/$1'

Bitbucket

如果您正在使用 Bitbucket,设置 pull-request-patternpull-request-urlcompare-url 选项。

pre-release-actions:
  changelog-update:
    format: pullRequest
    pull-request-pattern: 'Merged in .* \(pull request #([0-9]+)\)'
    pull-request-url: 'https://bitbucket.org/organization/repository/pull-requests/%s'
    compare-url: 'https://bitbucket.org/organization/repository/branches/compare/%2$s..%1$s#pull-requests'

完整配置参考

pre-release-actions:
  changelog-update:
    format: pullRequest
    file: CHANGELOG.md
    repo: organization/repository # has no effect if pull-request-url, compare-url and issue-url are set
    pull-request-pattern: 'Merged in .* \(pull request #([0-9]+)\)'
    pull-request-url: 'https://bitbucket.org/organization/repository/pull-requests/%s'
    compare-url: 'https://bitbucket.org/organization/repository/branches/compare/%2$s..%1$s#pull-requests'
    issue-pattern: '(JIR-[0-9]+)'
    issue-url: 'https://jira.example.com/browse/$1'

请注意,此格式化程序会忽略其他格式化程序中可用的一些选项,例如 dump-commitsexclude-merge-commits