geut / chan

A Changelog CLI based on http://keepachangelog.com/
ISC License
87 stars 10 forks source link

Version header #58

Closed gtkatakura closed 3 years ago

gtkatakura commented 3 years ago

Hi. Today geut/chan when prints version headers don't use brackets around the version number. Following the example of keep-a-changelog it uses brackets and some tools use this to parse the CHANGELOG to get the release notes, like release-it. What do you think about we start to put the brackets around the version number?

today

## 0.0.1 - 2000-01-01

suggested

## [0.0.1] - 2000-01-01

This is what happens in release-it when we don't have the brackets around the version number in github release notes. It get all the changelog instead stop in the last notes.

Screenshot from 2021-07-02 12-40-26

elmasse commented 3 years ago

Hi @gtkatakura, thanks for reporting this issue.

The brackets are added when a footnote url is provided when versioning. This is done automatically by reading the git repo information from the file system. When the git url cannot be read, the header is generated as a plain header.

The chan release command accepts a --git-url parameter used to create these links.

There was an issue related to this (chan not being able to resolve the url information) but as latest version, I tested that the very first release url is not being added, thus, header does not creates the link.

elmasse commented 3 years ago

Note:

The very first release should have a url (if git information can be detected or provided by --git-url param) pointing to the first tag.

GH: [0.0.1]: https://github.com/example/pkg/releases/tag/v0.0.1 GL: [0.0.1]: https://gitlab.com/example/pkg/-/tags/v1.0.0 BB: [0.0.1]: https://bitbucket.org/example/pkg/commits/tag/v0.0.1

gtkatakura commented 3 years ago

Oh, amazing. I manually wrote these versions into the end of my life and now it works like a charm. Thank you.

elmasse commented 3 years ago

@gtkatakura

A new version v3.0.3 has been released. This issue should be fixed now. Please test it and let us know!

Successfully published:
 - @geut/chan-core@3.0.3
 - @geut/chan-stringify@3.0.3
 - @geut/chan@3.0.3
 - @geut/chast@3.0.3
 - @geut/git-url-parse@3.0.3
 - @geut/remark-chan@3.0.3
elmasse commented 3 years ago

@gtkatakura

I'm closing this issue for now. Please feel free to re open.

Max.