shopsys / changelog-linker
[FORK] Generates beautiful CHANGELOG.md with links to PRs, versions and users grouped in Added/Changed/Fixed/Removed categories.
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
- nette/utils: ^2.5|^3.0
- symfony/console: ^3.4|^4.2
- symfony/http-kernel: ^3.4|^4.2
- symfony/process: ^3.4|^4.2
- symplify/package-builder: ^6.0.5
Requires (Dev)
- phpunit/phpunit: ^7.5|^8.0
- dev-master / 6.1.x-dev
- v6.0.5
- v6.0.4
- v6.0.3
- v6.0.2
- v6.0.1
- v6.0.0
- v5.5.1
- v5.5.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
- dev-rv-base-branch
This package is auto-updated.
Last update: 2024-11-05 21:15:00 UTC
README
Turn your CHANGELOG.md
from a machine readable text to a rich text that makes every programmer happy.
Install
composer require symplify/changelog-linker --dev
Usage
Create changelog-linker.yml
with configuration:
parameters: # this is detected from "git origin", but you can change it repository_url: 'https://github.com/symplify/symplify'
The config is autodiscovered in the root directory or by --config
option.
A. Dump Merges
vendor/bin/changelog-linker dump-merges
Write or Dry-run?
The --dry-run
option prints the result to the output. Without that, I looks for <!-- changelog-linker -->
in the CHANGELOG.md
to replace with the content.
It finds the last #ID in the CHANGELOG.md
, than looks on Github via API and dumps all the merged PRs since the last #ID in nice format. In case you want to specify minimal PR id yourself, use this:
vendor/bin/changelog-linker dump-merges --since-id 125
But that is a mash-up of everything. Not very nice:
## 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
What if we'd have Added, Changed... all the standard categories?
vendor/bin/changelog-linker dump-merges --in-categories
↓
## Unreleased ### Added - [#828] [ChangelogLinker] Add Unreleased to last tagged version feature - [#840] [ChangelogLinker] Add LinkifyWorker
Nice, now everything is nicely grouped.
(Do you want to know how we detect the category? Follow me)
What about packages - can we have group them as well? Sure:
vendor/bin/changelog-linker dump-merges --in-packages
↓
## Unreleased ### CodingStandard - [#851] Add _ support to PropertyNameMatchingTypeFixer - [#860] Add test case for #855, Thanks to @OndraM
(Technical secret: it reacts to [Package] in PR title.)
Let's take it one step further!
vendor/bin/changelog-linker dump-merges --in-packages --in-categories
↓
## Unreleased ### CodingStandard #### Added - [#851] Add _ support to PropertyNameMatchingTypeFixer - [#860] Add test case for #855, Thanks to @OndraM
Do you prefer categories first? Just switch the order:
vendor/bin/changelog-linker dump-merges --in-categories --in-packages
↓
## Unreleased ### Added #### EasyCodingStandard - [#851] Add _ support to PropertyNameMatchingTypeFixer - [#860] Add test case for #855, Thanks to @OndraM
Github API Overload?
In case you cross the API rate limit and get denied, create new Github Token and run it via GITHUB_TOKEN
ENV variable.
GITHUB_TOKEN super-secret-token vendor/bin/changelog-linker dump-merges
B. Decorate CHANGELOG.md
vendor/bin/changelog-linker link
1. Link PR and Issues
### 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. Link Versions to Diffs
-## 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. Can I Thank My Contributors?
Of course! Give your contributors credit they deserve:
### [v2.0.0] - 2017-12-31 -- ... thanks @SpacePossum for help +- ... thanks [@SpacePossum] for help + +[@SpacePossum]: https://github.com/SpacePossum
You can exclude core maintainers, to give external contributors more credit:
# changelog-linker.yml parameters: authors_to_ignore: ['TomasVotruba']
4. How to Link Specific Words?
In Symplify, I need that every EasyCodingStandard
word leads to https://github.com/Symplify/EasyCodingStandard/
.
# changelog-linker.yml parameters: names_to_urls: EasyCodingStandard: 'https://github.com/Symplify/EasyCodingStandard/'
## Unreleased ### Added -#### EasyCodingStandard +#### [EasyCodingStandard] + +[EasyCodingStandard]: https://github.com/Symplify/EasyCodingStandard/
5. Can I Write Shorter PR Titles?
Just add alias to config:
# changelog-linker.yml parameters: package_aliases: CS: 'CodingStandard'
...and it will be resolved to CodingStandard
package.