symplify / changelog-linker
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^7.2
- nette/utils: ^3.2
- symfony/console: ^4.4|^5.2
- symfony/http-kernel: ^4.4|^5.2
- symfony/process: ^4.4|^5.2
- symplify/package-builder: ^9.2.6
- symplify/set-config-resolver: ^9.2.6
- symplify/smart-file-system: ^9.2.6
- symplify/symplify-kernel: ^9.2.6
Requires (Dev)
- phpunit/phpunit: ^9.5
- dev-main
- v9.2.6
- v9.2.5
- v9.2.4
- v9.2.3
- v9.2.2
- 9.2.1
- 9.2.0
- 9.1.9
- 9.1.8
- 9.1.7
- 9.1.6
- 9.1.5
- 9.1.4
- 9.1.3
- 9.1.1
- 9.1.0
- 9.0.50
- 9.0.49
- 9.0.48
- 9.0.47
- 9.0.46
- 9.0.45
- 9.0.44
- 9.0.43
- 9.0.42
- 9.0.41
- 9.0.40
- 9.0.39
- 9.0.38
- 9.0.37
- 9.0.36
- 9.0.35
- 9.0.34
- 9.0.33
- 9.0.32
- 9.0.31
- 9.0.30
- 9.0.29
- 9.0.28
- 9.0.27
- 9.0.26
- 9.0.25
- 9.0.24
- 9.0.23
- 9.0.22
- 9.0.21
- 9.0.20
- 9.0.19
- 9.0.18
- 9.0.17
- 9.0.16
- 9.0.15
- 9.0.14
- 9.0.13
- 9.0.12
- 9.0.11
- 9.0.10
- 9.0.9
- 9.0.8
- 9.0.7
- 9.0.6
- 9.0.5
- 9.0.4
- 9.0.3
- 9.0.2
- 9.0.1
- 9.0.0
- 9.0.0-rc1
- 9.0.0-BETA9
- 9.0.0-BETA8
- 9.0.0-BETA7
- 9.0.0-BETA6
- 9.0.0-BETA5
- 9.0.0-BETA4
- 9.0.0-BETA3
- 9.0.0-BETA2
- 9.0.0-BETA1
- 8.3.48
- 8.3.47
- 8.3.46
- 8.3.45
- 8.3.44
- 8.3.43
- 8.3.42
- 8.3.41
- 8.3.40
- 8.3.39
- 8.3.38
- 8.3.37
- 8.3.36
- 8.3.35
- 8.3.34
- 8.3.33
- 8.3.32
- 8.3.31
- 8.3.30
- 8.3.29
- 8.3.28
- 8.3.27
- 8.3.26
- 8.3.25
- 8.3.24
- 8.3.23
- 8.3.22
- 8.3.21
- 8.3.20
- 8.3.19
- 8.3.18
- 8.3.17
- 8.3.16
- 8.3.15
- 8.3.14
- 8.3.13
- 8.3.12
- 8.3.11
- 8.3.10
- 8.3.7
- 8.3.6
- 8.3.5
- 8.3.4
- 8.3.3
- 8.3.2
- 8.3.1
- 8.3.0
- 8.2.27
- 8.2.26
- 8.2.25
- 8.2.24
- 8.2.22
- 8.2.21
- 8.2.20
- 8.2.19
- 8.2.18
- 8.2.17
- v8.2.16
- v8.2.15
- v8.2.14
- v8.2.13
- v8.2.12
- v8.2.11
- v8.2.10
- v8.2.9
- v8.2.8
- v8.2.7
- v8.2.6
- v8.2.5
- v8.2.4
- v8.2.3
- v8.2.2
- v8.2.1
- v8.2.0
- v8.1.20
- v8.1.19
- v8.1.18
- v8.1.17
- v8.1.16
- v8.1.15
- v8.1.14
- v8.1.13
- v8.1.12
- v8.1.11
- v8.1.10
- v8.1.9
- v8.1.8
- v8.1.7
- v8.1.6
- v8.1.4
- v8.1.3
- v8.1.2
- v8.1.1
- v8.1.0
- v8.0.1
- v8.0.0
- v8.0.0-beta4
- v8.0.0-beta3
- v8.0.0-beta2
- v8.0.0-beta1
- v7.3.18
- v7.3.17
- v7.3.16
- v7.3.15
- v7.3.14
- v7.3.13
- v7.3.11
- v7.3.10
- v7.3.9
- v7.3.8
- v7.3.7
- v7.3.6
- v7.3.5
- v7.3.4
- v7.3.3
- v7.3.2
- v7.3.1
- v7.3.0
- v7.2.20
- v7.2.19
- v7.2.18
- v7.2.17
- v7.2.16
- v7.2.15
- v7.2.14
- v7.2.13
- v7.2.12
- v7.2.11
- v7.2.10
- v7.2.8
- v7.2.7
- v7.2.6
- v7.2.5
- v7.2.4
- v7.2.3
- v7.2.2
- v7.2.1
- v7.2.0
- v7.1.3
- v7.1.2
- v7.1.1
- v7.1.0
- v7.0.2
- v7.0.1
- v7.0.0
- v6.1.0
- v6.0.5
- v6.0.4
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0.0
- v5.4.16
- v5.4.15
- v5.4.14
- v5.4.13
- v5.4.12
- v5.4.11
- v5.4.10
- v5.4.9
- v5.4.8
- v5.4.7
- v5.4.6
- v5.4.5
- v5.4.4
- v5.4.3
- v5.4.2
- v5.4.1
- v5.4.0
- v5.3.12
- v5.3.11
- v5.3.10
- v5.3.9
- v5.3.8
- v5.3.7
- v5.3.6
- v5.3.5
- v5.3.4
- v5.3.2
- v5.3.1
- v5.3.0
- v5.2.22
- v5.2.20
- v5.2.19
- v5.2.18
- v5.2.17
- v5.2.16
- v5.2.15
- v5.2.14
- v5.2.13
- v5.2.12
- v5.2.11
- v5.2.10
- v5.2.9
- v5.2.8
- v5.2.7
- v5.2.6
- v5.2.5
- v5.2.4
- v5.2.3
- v5.2.2
- v5.2.1
- v5.2.0
- v5.1.4
- v5.1.3
- v5.1.2
- v5.1.1
- v5.1.0
- v5.0.2
- v5.0.1
- v5.0.0
- v4.8.0
- v4.7.0
- v4.6.1
- v4.6.0
- v4.5.1
- v4.5.0
- v4.4.2
- v4.4.1
- v4.4.0
- v4.3.0
- v4.2.3
- v4.2.2
- v4.2.1
- v4.2.0
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v4.0.0beta1
- v4.0.0alpha6
- v4.0.0alpha5
- v4.0.0alpha4
- v4.0.0alpha3
- v4.0.0alpha2
- v4.0.0alpha1
- v3.2.30
- v3.2.29
- v3.2.28
- v3.2.27
- v3.2.26
- v3.2.25
- v3.2.24
- v3.2.23
- v3.2.22
- v3.2.21
- v3.2.20
- v3.2.18
- v3.2.17
- v3.2.15
- v3.2.14
- v3.2.13
- v3.2.12
- v3.2.11
- v3.2.10
- v3.2.9
- v3.2.7
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
This package is auto-updated.
Last update: 2021-03-23 12:57:20 UTC
README
此包已弃用。您想接管它或寻找替代品? 查看问题
将您的CHANGELOG.md
从机器可读文本转换为让每个程序员都感到满意的富文本。
安装
composer require symplify/changelog-linker --dev
用法
使用配置创建changelog-linker.php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::REPOSITORY_URL, 'https://github.com/symplify/symplify'); };
配置在根目录中自动发现或在--config
选项中。
A. 导出合并
vendor/bin/changelog-linker dump-merges
写入或试运行?
--dry-run
选项将结果打印到输出。如果没有这个选项,程序将在CHANGELOG.md
中查找<!-- changelog-linker -->
并将其替换为内容。
它找到CHANGELOG.md
中的最后一个#ID,然后通过API在GitHub上查找并按良好格式导出自最后一个#ID以来的所有已合并PR。如果您想自己指定最小PR ID,请使用此选项
vendor/bin/changelog-linker dump-merges --since-id 125
但这会混合所有内容。不太好看
## Unreleased - [#868] [ChangelogLinker] Add ChangeTree to manage merge messages - [#867] [ChangelogLinker] Change Worker registration from implicit to explicit - [#865] Improve Code Complexity - [#864] [MonorepoBuilder] improve coverage
如果我们有添加、更改...所有标准分类怎么办?
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\ChangelogFormat; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); $parameters->set(Option::CHANGELOG_FORMAT, ChangelogFormat::CATEGORIES_ONLY); };
vendor/bin/changelog-linker dump-merges
↓
## Unreleased ### Added - [#828] [ChangelogLinker] Add Unreleased to last tagged version feature - [#840] [ChangelogLinker] Add LinkifyWorker
很好,现在所有内容都整齐地分组了。
(想知道我们是如何检测分类的吗? 跟随我)
您可以使用以下4个包/分类选项
Symplify\ChangelogLinker\ValueObject\ChangelogFormat::PACKAGES_THEN_CATEGORIES; Symplify\ChangelogLinker\ValueObject\ChangelogFormat::CATEGORIES_THEN_PACKAGES; Symplify\ChangelogLinker\ValueObject\ChangelogFormat::CATEGORIES_ONLY; Symplify\ChangelogLinker\ValueObject\ChangelogFormat::PACKAGES_ONLY;
基础分支
您想只导出合并到特定分支的pull请求吗?只需使用base-branch
选项
vendor/bin/changelog-linker dump-merges --base-branch=7.3
当您支持您的项目的多个版本时,这非常方便。
GitHub API过载?
如果您超过API速率限制并被拒绝,请创建新的GitHub令牌并通过GITHUB_TOKEN
环境变量运行它。
GITHUB_TOKEN super-secret-token vendor/bin/changelog-linker dump-merges
B. 装饰CHANGELOG.md
vendor/bin/changelog-linker link
1. 链接PR和问题
### Added -- #123 Cool new without detailed description wanting me to see PR, [closes #234] +- [#123] Cool new without detailed description wanting me to see PR, [closes [#234]] + +[#123]: https://github.com/symplify/symplify/pull/123 +[#234]: https://github.com/symplify/symplify/pull/234
2. 将版本链接到差异
-## v2.0.0 - 2017-12-31 +## [v2.0.0] - 2017-12-31 - ... ## v1.5.0 - 2017-06-30 + +[v2.0.0]: https://github.com/symplify/symplify/compare/v1.5.0...v2.0.0
3. 我能感谢我的贡献者吗?
当然可以!给你的贡献者应得的认可
### [v2.0.0] - 2017-12-31 -- ... thanks @SpacePossum for help +- ... thanks [@SpacePossum] for help + +[@SpacePossum]: https://github.com/SpacePossum
你可以排除核心维护者,以给外部贡献者更多的认可
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::AUTHORS_TO_IGNORE, ['TomasVotruba']); };
4. 如何链接特定的单词?
在Symplify中,我需要每个 EasyCodingStandard
单词都链接到 https://github.com/symplify/easy-coding-standard/
。
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::NAMES_TO_URLS, [ 'EasyCodingStandard' => 'https://github.com/symplify/easy-coding-standard/', ]); };
## Unreleased ### Added -#### EasyCodingStandard +#### [EasyCodingStandard] + +[EasyCodingStandard]: https://github.com/symplify/easy-coding-standard/
5. 我能写更短的PR标题吗?
只需在配置中添加别名即可
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::PACKAGE_ALIASES, [ 'CS' => 'CodingStandard', ]); };
...它将被解析为 CodingStandard
包。
报告问题
如果您遇到错误或想请求新功能,请前往 Symplify monorepo issue tracker
贡献
此包的源代码包含在Symplify monorepo中。我们欢迎在 symplify/symplify 上为此包做出贡献。