Skip to content

feat: semrel changelog — generate/update CHANGELOG.md without releasing #192

@mwaldheim

Description

@mwaldheim

Summary

A standalone semrel changelog subcommand that generates or updates the project changelog from unreleased commits without performing a full release.

Motivation

There are common workflows where only the changelog needs to be refreshed:

  • Previewing what the next release notes would look like in a PR
  • Maintaining a CHANGELOG.md that's committed to the repo continuously (not just at release time)
  • Generating release notes for a draft PR description

Currently this requires running semrel release --dry-run and manually extracting the changelog output.

Proposed CLI

# Preview to stdout
semrel changelog

# Write/update CHANGELOG.md in place
semrel changelog --write

# Output in a specific format
semrel changelog --format markdown
semrel changelog --format json

# Limit to last N releases
semrel changelog --since v1.0.0

Behaviour

  • Uses the same generator plugins already configured in .semrel.yaml
  • Respects SEMREL_PLUGIN_TEMPLATE and other generator env-vars
  • Does not create tags, push anything or invoke provider/hook plugins
  • Exit code 0 when unreleased commits are found, exit 2 when there is nothing to release (same as dry-run)

Acceptance criteria

  • semrel changelog command implemented
  • --write flag updates the file in-place (prepend to existing CHANGELOG.md)
  • Works with all generator plugins (changelog-md, changelog-html, release-notes)
  • Usable in CI as a read-only step

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions