-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add --prettier
flag for Prettier-formatted changelogs
#155
Conversation
976f9ce
to
79caa80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than running Prettier programatically, couldn't we just remove the changelog from the ignore list, and disable formatting with a flag?
I'm not sure. The |
We run Prettier regardless, hence why it's currently ignored. |
Not always at the same time as updating the changelog though. There's also the |
If we ignore formating, enforcing that the sections are always in the same order may be more complex. Yes @Gudahtt, this is why I passed the formatter to both |
Ok, makes sense! |
If we are not willing to add a formatter, I suppose I could workaround like this: Replace
And replace
and then check if the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR adds a new
--prettier
flag. When enabled, this flag signals that the tool should expect the changelog to be formatted using Prettier. By default, this flag is set tofalse
, ensuring backward compatibility with all existingCHANGELOG.md
files.The primary motivation for this change is to overcome a current limitation of
auto-changelog
. At present, our tool does not support the changelog format provided by Keep a Changelog (version ^1.1.0).Fixes: #60