Skip to content

Ensure At Least One Blank Line Above When Updating Changelog #509

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

Closed
Kurt-von-Laven opened this issue May 2, 2022 · 1 comment · Fixed by #511
Closed

Ensure At Least One Blank Line Above When Updating Changelog #509

Kurt-von-Laven opened this issue May 2, 2022 · 1 comment · Fixed by #511
Labels
type: feature A new enhacement proposal

Comments

@Kurt-von-Laven
Copy link
Contributor

Kurt-von-Laven commented May 2, 2022

Description

If you initialize the changelog with some additional documentation (e.g., "This changelog is auto-generated by the Python-based
Commitizen."), then the first time you release, the auto-generated text appears immediately below the existing text, which looks fairly ugly. Subsequent releases have one blank line of whitespace between them. It's simple enough to manually add the extra blank line at the top in oneself (ideally before first running cz bump), but it would add a bit of polish to automatically insert the extra blank line on the first release just like all of the rest.

Possible Solution

If the changelog already exists, the first release is no handled no differently than the rest. If there is no changelog, the current behavior should remain unchanged, meaning don't start adding an extra blank line at the top of the file.

Additional context

I am happy to open a pull request if there are no concerns regarding this minor change. This makes it possible to include an initial changelog with some documentation in a template repository without violating a Prettier pre-commit hook.

Additional context

No response

@Kurt-von-Laven Kurt-von-Laven added the type: feature A new enhacement proposal label May 2, 2022
@woile
Copy link
Member

woile commented May 2, 2022

Thanks, sounds good the request, the PR would be super welcomed 💪🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new enhacement proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants