All Projects → symplify → Changelog Linker

symplify / Changelog Linker

Licence: mit
[READ-ONLY] Make CHANGELOG.md Useful with Links

Projects that are alternatives of or similar to Changelog Linker

changelog-linker
[READ-ONLY] Make CHANGELOG.md Useful with Links
Stars: ✭ 81 (-4.71%)
Mutual labels:  changelog, utils
Schematics Utilities
🛠️ Useful exported utilities for working with Schematics
Stars: ✭ 73 (-14.12%)
Mutual labels:  utils
Dialogutil
common used dialog with material style ( in support v7),ios style,get top activity automatically, invoke everywhere (any thread , any window)
Stars: ✭ 948 (+1015.29%)
Mutual labels:  utils
Sassyfication
💅Library with sass mixins to speed up your css workflow.
Stars: ✭ 51 (-40%)
Mutual labels:  utils
Apnsutil
APNSUtil is makes code simple using apple push notification service
Stars: ✭ 31 (-63.53%)
Mutual labels:  utils
Bash Utils
utils for shell
Stars: ✭ 58 (-31.76%)
Mutual labels:  utils
Fugitive
Simple command line tool to make git more intuitive, along with useful GitHub addons.
Stars: ✭ 20 (-76.47%)
Mutual labels:  changelog
Favicon Switcher
Make favicon react on media queries
Stars: ✭ 76 (-10.59%)
Mutual labels:  utils
Changelog Ci
Changelog CI is a GitHub Action that generates changelog, Then the changelog is committed and/or commented to the release Pull request.
Stars: ✭ 68 (-20%)
Mutual labels:  changelog
Cfrs
Child Frame Read String
Stars: ✭ 46 (-45.88%)
Mutual labels:  utils
Dnsforwarder
Just a DNS utility.
Stars: ✭ 1,029 (+1110.59%)
Mutual labels:  utils
Tina
a powerful android network library base on okhttp
Stars: ✭ 32 (-62.35%)
Mutual labels:  utils
Css In Js Utils
Useful utility functions for CSS in JS solutions
Stars: ✭ 61 (-28.24%)
Mutual labels:  utils
Git Changelog
Automatic Changelog generator using Jinja2 templates.
Stars: ✭ 30 (-64.71%)
Mutual labels:  changelog
Statusbarutil
A util for setting status bar style on Android App.
Stars: ✭ 8,726 (+10165.88%)
Mutual labels:  utils
Androidutilcode
AndroidUtilCode 🔥 is a powerful & easy to use library for Android. This library encapsulates the functions that commonly used in Android development which have complete demo and unit test. By using it's encapsulated APIs, you can greatly improve the development efficiency. The program mainly consists of two modules which is utilcode, which is commonly used in development, and subutil which is rarely used in development, but the utils can be beneficial to simplify the main module. 🔥
Stars: ✭ 30,239 (+35475.29%)
Mutual labels:  utils
Pitaya
A simple general-purpose utility library for Java 6+
Stars: ✭ 38 (-55.29%)
Mutual labels:  utils
Rambda
Faster and smaller alternative to Ramda
Stars: ✭ 1,066 (+1154.12%)
Mutual labels:  utils
Mpermissionutils
Android6.0 运行时权限处理工具类
Stars: ✭ 84 (-1.18%)
Mutual labels:  utils
Hr
A horizontal 📏 for your terminal
Stars: ✭ 1,195 (+1305.88%)
Mutual labels:  utils

Changelog Linker

Downloads

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.php with configuration:

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');
};

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?

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

Nice, now everything is nicely grouped.

(Do you want to know how we detect the category? Follow me)

You have 4 packages/cateogires options you can use:

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;

Base Branch

Do you want to dump only such pull requests that were merged into a particular branch? Just use base-branch option:

vendor/bin/changelog-linker dump-merges --base-branch=7.3

This is very handy when you support multiple versions of your project.

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:

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. How to Link Specific Words?

In Symplify, I need that every EasyCodingStandard word leads to 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. Can I Write Shorter PR Titles?

ECS-Run

Just add alias to config:

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',
    ]);
};

...and it will be resolved to CodingStandard package.


Report Issues

In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker

Contribute

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].