Skip to content

feat(changelog): alphabetize commit summaries & scopes in default templates #1111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

codejedi365
Copy link
Contributor

@codejedi365 codejedi365 commented Nov 30, 2024

Purpose

  • Improve ease of reading changelog with many adjustments

Rationale

This is more of an aesthetic component to make the changelog easier to read. When run an alphabetical sort on the different changes then it automatically will group like values together. This is very helpful when people use pre-defined or common scope values which consolidates those updates. Conversely if you have a mixture of scoped and non-scoped commits, it will lay out all the non-scoped commits first (which generally mean they cover a larger subset of the project) before the smaller more specific changes are listed.

How did you test?

Adjusted the fake release history fixtures to provide a non-alphabetical ordering to commits and then force it to comply with the resulting test that is in a set order. This ensures the commits were in fact sorted first by scope and secondly by alphabetical descriptions

How to Verify

  1. Checkout this pr
  2. Reset by 2 commits to remove the fix
  3. Run pytest to see the failures where the commits are not in alphabetical order or in scoped order
  4. Fast forward merge to the latest commit of this pr
  5. Run pytest again to see it is fixed.

@codejedi365 codejedi365 force-pushed the feat/alphabetize-commit-scopes-n-descriptions branch from d5e0fa1 to 6a762f8 Compare November 30, 2024 22:11
@codejedi365 codejedi365 merged commit 8327068 into python-semantic-release:master Nov 30, 2024
12 checks passed
@codejedi365 codejedi365 deleted the feat/alphabetize-commit-scopes-n-descriptions branch November 30, 2024 22:17
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