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

feat: support a verbose heading for the changelog #80

Merged
merged 1 commit into from
Sep 1, 2020
Merged

feat: support a verbose heading for the changelog #80

merged 1 commit into from
Sep 1, 2020

Conversation

ramsey
Copy link
Contributor

@ramsey ramsey commented Aug 31, 2020

This PR addresses the reason I stumbled upon #79.

I tend to use headings similar to the following for my CHANGELOG.md files:

# ramsey/devtools Changelog

When I ran keep-a-changelog bump against an existing (created before installing phly/keep-a-changelog) CHANGELOG.md, I got the following error (after applying the patch from PR #79):

Unable to find any changelog entries in file /path/to/ramsey/devtools/CHANGELOG.md; is it formatted correctly? 

This error occurs because the regular expression in ChangelogBump::updateChangelog() expects a strict heading of:

# Changelog

Since Keep A Changelog is not an exact specification (it's a convention), I would like to relax the strictness here. I still think the word "changelog" should be in the heading, so this new regular expression enforces this, but it allows for content to come before and after the word "changelog," and it allows "changelog" to be case-insensitive.

@weierophinney weierophinney merged commit 987489a into phly:2.9.x Sep 1, 2020
@ramsey ramsey deleted the features/changelog-file-heading branch September 1, 2020 21:21
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