Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse change logs in the style of keepachangelog.com #421

Merged
merged 4 commits into from
Dec 29, 2021

Conversation

ifazk
Copy link
Contributor

@ifazk ifazk commented Dec 26, 2021

I recently started using the change log format specified in https://keepachangelog.com. This format uses "Changelog" as the first level of header.

This resulted in dune-release trying to use "Changelog" as the tag. I manually specified the tag, but then dune-release used the entire changelog for the pull-request message, see ocaml/opam-repository#20195.

This PR changes Text.change_log_last_entry to recurse into changes if the header title is "Changelog", and drops brackets around version numbers if there are any.

Btw, I wasn't sure if PRs from outsiders are welcome or not and I didn't find a contribution guide. Hope this doesn't feel too aggressive since I didn't open an issue first.

Copy link
Member

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

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

Hi @ifazk, thanks for your PR. Contributions are most definitely welcome! I thought this was somewhat obvious but it is a good point and we should probably create a CONTRIBUTING.md to describe what and how.

As to the PR itself, I wasn't aware of this format before but the changes required to also support that are rather small so I think this is a fine addition. I appreciate that you added tests for it, because otherwise it would be prone to breaking accidentally. I wrote some comments for improving it, so if you could address these I think it is ok to merge.

@Leonidas-from-XIV Leonidas-from-XIV merged commit 24015eb into tarides:main Dec 29, 2021
@Leonidas-from-XIV
Copy link
Member

Our CI formatting linter is a bit broken, so I'm merging after checking it locally. Thanks!

@ifazk
Copy link
Contributor Author

ifazk commented Dec 29, 2021

Thanks for your help and guidance in getting this merged!

@ifazk ifazk deleted the keep-a-cl branch December 31, 2021 08:44
NathanReb added a commit to NathanReb/opam-repository that referenced this pull request Feb 10, 2022
CHANGES:

### Added

- Add `--skip-lint`, `--skip-build`, `--skip-test` and
  `--keep-build-dir` to the main command (tarides/dune-release#419, @NathanReb)
- Added support for parsing changelogs written in the style of
  [keepachangelog.com](https://keepachangelog.com/) (tarides/dune-release#421, @ifazk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants