Skip to content

Sane defaults for CHANGELOG.md #691

@matteosantama

Description

@matteosantama

The documentation section How to Keep a Changelog in Markdown is very nice, but the required configuration is rather verbose

[tool.towncrier]
directory = "changelog.d"
filename = "CHANGELOG.md"
start_string = "<!-- towncrier release notes start -->\n"
underlines = ["", "", ""]
title_format = "## [{version}](https://github.com/twisted/my-project/tree/{version}) - {project_date}"
issue_format = "[#{issue}](https://github.com/twisted/my-project/issues/{issue})"

[[tool.towncrier.type]]
directory = "security"
name = "Security"
showcontent = true

[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true

[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true

[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true

[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true

There are two things towncrier could do to shorten this, presumably, very popular configuration.

  1. The documentation says showcontent = true by default when using TOML tables, but this is wrong. If you comment out showcontent = true in the above configuration, you get a missing key error when building the changelog.
  2. You should only need to specify directory or name in the above configuration. The other can be reasonably inferred (with an option to override this behavior by specifying both).

Would the maintainers of towncrier be open to receiving a PR with these two changes? They would both be fully backward-compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions