Skip to content

Change log should contain only messages that change user experience #965

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

Closed
aaltat opened this issue Jun 23, 2024 · 5 comments
Closed

Change log should contain only messages that change user experience #965

aaltat opened this issue Jun 23, 2024 · 5 comments
Labels
feature A new feature or a feature request

Comments

@aaltat
Copy link

aaltat commented Jun 23, 2024

Description

Currently with semantic release GitHub action, changelog file contains many type of changes in the chnagelog which are not interesting for the end user. Example user has dependabot updating dependencies in the project, changelog contains all chore type of changes created by dependabot. This also includes all dev type changes, which are not interesting for the users of the library. To solve this type of problem I would configure semantic release GitHub action to not parse chore type of tags to the changelog if dependency update was made to development dependencies. If that is not possible, then I would like to skip all chore type of updates semantic release GitHub action.

Use cases

dependabot creates lots of chore type of updates in change log, which makes reading the changelog hard because it is cluttered.

@aaltat aaltat added the feature A new feature or a feature request label Jun 23, 2024
@codejedi365
Copy link
Contributor

codejedi365 commented Jun 23, 2024

@aaltat, thank you for your feedback. This feature is available through user configuration but is not set up by default (yet). You should add a list of regular expressions to the setting semantic_release.changelog.exclude_commit_patterns for the commits you do not want to be included in the changelog.

Dependabot's commits are fairly standardized which make this relatively easy. You can look at this project's configuration as I have already defined numerous regular expressions to filter out non-user relevant commits. It works quite well for the conventional commit standard.

There is a significant amount of work in progress that will help set better default changelogs in the future but the milestone is not complete yet. Setting better defaults for changelogs to filter out based on commit parser is one effort which would solve this request.

If you want to also clear the additional clutter of the entire commit message (dependabots commit body) then you will want to look into customizing your changelog where you can easily change the output to only include the commit.descriptions.0 rather than the entire commit. This also will be more default in the future (#866) once I can handle squash commits more nicely.

@codejedi365 codejedi365 added the awaiting-reply Waiting for response label Jun 23, 2024
@codejedi365 codejedi365 changed the title Chnage log should contain only messages that change user experience Change log should contain only messages that change user experience Jun 23, 2024
@aaltat
Copy link
Author

aaltat commented Jun 23, 2024

Other thing that comes in my mind is to tell order based on the tags. Backwards incompatible, feat and fix first, then rest. Or is that possible already?

I did not see that I can pass the exclude commit pattern with GitHub action, I need to investigate it more. Thanks for the tip.

Thank you for the good work with the project.

@codejedi365
Copy link
Contributor

codejedi365 commented Jun 23, 2024

I did not see that I can pass the exclude commit pattern with GitHub action, I need to investigate it more. Thanks for the tip.

Happy to help! And no, it's not quite passed through to the action via the yaml but instead when your project repo is mounted into the PSR container, it will read a project configuration out of your configuration file (pyproject.toml by default, otherwise specify via -c in root options).

order based on the tags... Or is that possible already?

It would only be possible through providing a custom template currently. You can reference #866 for an example of defining the tag order in a macro and then using the list to pick out desired change types in the order you want.

@aaltat
Copy link
Author

aaltat commented Jun 24, 2024

I think I will go with the exclude pattern, at least first. Although custom template is an option if exclude pattern doesn’t work in my case.

Because what I want is actually possible, should we close the issue?

@codejedi365 codejedi365 removed the awaiting-reply Waiting for response label Jun 24, 2024
@codejedi365
Copy link
Contributor

Glad to help and let me know if you have trouble getting the exclusions to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or a feature request
Projects
None yet
Development

No branches or pull requests

2 participants