Skip to content

prepare-changelog: no structure-only validate mode (validate rejects an empty Unreleased, so it cannot gate commits on release branches) #2071

Open

Description

@gerchowl

prepare-changelog validate checks two things at once: structure (loose bullets, a repeated standard ### heading) and content (## Unreleased must have entries). A consumer that wants to gate every commit on structure alone cannot use it: on a release branch the freeze leaves Unreleased empty by design, and validate exits 1 with Unreleased section is empty (no changes to release).

Repro: a CHANGELOG with an empty ## Unreleased and a populated ## [0.1.0] - TBD section; prepare-changelog validate CHANGELOG.md exits 1.

Request: a structure-only mode (for example validate --structure-only) that runs the existing duplicate-heading and loose-bullet checks over ## Unreleased and every ## [X.Y.Z] section, accepts an empty Unreleased, and exits 0/1 on structure alone. The checks are already shared helpers; the missing piece is a way to skip the content requirement. Today a consumer has to reimplement the duplicate-heading check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions