Skip to content

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

Closed
@Kurt-von-Laven

Description

@Kurt-von-Laven

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions