Skip to content

feat(parser-emoji): render descriptive changelog labels - #1468

Open
floze-the-genius wants to merge 2 commits into
python-semantic-release:masterfrom
floze-the-genius:feat/1409-render-emoji-changelog
Open

feat(parser-emoji): render descriptive changelog labels#1468
floze-the-genius wants to merge 2 commits into
python-semantic-release:masterfrom
floze-the-genius:feat/1409-render-emoji-changelog

Conversation

@floze-the-genius

Copy link
Copy Markdown

Purpose

Implements #1409 by adding an opt-in commit_parser_options.render_emoji setting for the built-in emoji parser. When enabled, default shortcode categories render as descriptive Unicode changelog headings (for example, 🐛 Bug Fixes) and the classified leading tag is removed from the commit summary.

The default behavior remains unchanged, and custom tags that do not have a built-in display label continue to use their configured value.

Rationale

The changelog already groups entries using ParsedMessageResult.category and renders the first description as the bullet text. Keeping the change in the emoji parser avoids a second template tree and avoids a runtime dependency: the parser can opt in to a static mapping for the tags it already supports, while preserving backward compatibility.

How did you test?

  • Added regression coverage for shortcode headings, tag-free summaries, and scoped commits.
  • Focused parser and default changelog tests: 1055 passed.
  • Full non-comprehensive suite with six workers: 4266 passed, 15 skipped.
  • Repository-wide Ruff check and format check passed.
  • Focused mypy check for the changed source passed. Full mypy . reaches four existing importlib.resources/importlib_resources no-redef errors in untouched files under Python 3.13.
  • Sphinx completed rendering all pages; strict warning mode reports three existing warnings in untouched documentation/docstrings.
  • git diff --check passed.

How to Verify

  1. Configure commit_parser = "emoji".
  2. Set commit_parser_options.render_emoji = true.
  3. Parse :bug: correct some text and generate a changelog.
  4. Confirm the section is 🐛 Bug Fixes and the bullet begins with Correct some text, without the :bug: prefix.
  5. Disable the option and confirm the existing shortcode output is unchanged.

AI disclosure

I used OpenAI Codex to help investigate the issue, implement the change, and run validation. I reviewed the final diff, test results, and PR description before submission.


PR Completion Checklist

  • Reviewed & followed the Contributor Guidelines
  • Changes Implemented & validation pipeline submitted
  • Commits follow Conventional Commits and are separated into test and feature commits
  • Appropriate Unit tests added
  • Existing End-to-End suite passed; no dedicated CLI E2E was needed for this parser data-contract change
  • Appropriate Documentation added and Sphinx syntax validated

Cover opt-in descriptive emoji headings, tag-free summaries, and parsed scopes.

Implements: python-semantic-release#1409

Signed-off-by: Floze <88098863+floze-the-genius@users.noreply.github.com>
Map built-in shortcode tags to descriptive Unicode changelog section labels.

Enable this mapping only through the opt-in parser setting.

Remove the classified tag from commit summaries in that mode.

Keep custom tags and default output unchanged.

Implements: python-semantic-release#1409

Signed-off-by: Floze <88098863+floze-the-genius@users.noreply.github.com>
@floze-the-genius

Copy link
Copy Markdown
Author

Rewrote the two commit messages to satisfy the repository’s 100-character body-line limit. The code/documentation diff is byte-for-byte unchanged; only commit metadata changed.

All commit-message lines are now at most 79 characters, and both commits retain their Conventional Commit subjects, issue references, and DCO sign-offs.

@floze-the-genius
floze-the-genius force-pushed the feat/1409-render-emoji-changelog branch from 21cf5e0 to 6c97882 Compare July 20, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant