Skip to content

Commit

Permalink
use keep a changelog format
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Aug 20, 2019
1 parent d80f99c commit a7762a2
Showing 1 changed file with 74 additions and 71 deletions.

9 comments on commit a7762a2

@ungoldman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The brackets in keepachangelog's format are link references.

If you look at the bottom of the example at https://keepachangelog.com/en/1.0.0/, you'll notice this section

[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0
[0.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.8...v0.1.0
[0.0.8]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.7...v0.0.8
[0.0.7]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.6...v0.0.7
[0.0.6]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.5...v0.0.6
[0.0.5]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.4...v0.0.5
[0.0.4]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.3...v0.0.4
[0.0.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.2...v0.0.3
[0.0.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.0.1...v0.0.2
[0.0.1]: https://github.com/olivierlacan/keep-a-changelog/releases/tag/v0.0.1

This is a common mistake that the example seems to have encouraged, I've seen this mistake a lot in change logs trying to adhere to the (admittedly loose) keep a changelog standard. 😞

@feross
Copy link
Member Author

@feross feross commented on a7762a2 Aug 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! This seems super annoying to update by hand, though. Is there a tool that can lint the changelog? Do you think it's worth following this format?

@ungoldman
Copy link
Contributor

@ungoldman ungoldman commented on a7762a2 Aug 20, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feross
Copy link
Member Author

@feross feross commented on a7762a2 Aug 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, will do that :)

@vweevers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're interested, I'm considering writing a remark plugin for linting Keep A Changelog and automatically inserting links. Will then include that plugin in hallmark, which is like standard for markdown. Then you'll be able to hallmark CHANGELOG.md to lint and hallmark --fix CHANGELOG.md to insert links.

@ungoldman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vweevers I'm definitely interested! have been wanting to automate this for a long time but never got around to it. I think remark is the right way to go too 👍

@feross
Copy link
Member Author

@feross feross commented on a7762a2 Aug 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vweevers This is neat. Once you implement that, it would be cool to try adopting hallmark on standard

@vweevers
Copy link
Contributor

@vweevers vweevers commented on a7762a2 Aug 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/vweevers/remark-changelog and vweevers/hallmark#37.

To try it out:

cd standard
npx vweevers/hallmark CHANGELOG.md --fix

Already finds 199 issues, 73 of which can be fixed automatically. Some rules may be too strict, shall I open a PR to standard to discuss those?

@feross
Copy link
Member Author

@feross feross commented on a7762a2 Sep 4, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vweevers I like it! I just opened a PR with the autofix changes, which are all great! #1398

Please sign in to comment.