-
Notifications
You must be signed in to change notification settings - Fork 255
Issue with exclude_commit_patterns in Changelog #1246
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
Comments
Hi @JeromeCheviet, I'm glad you noticed and appreciated the updates I've made to the default changelog, but I'm sorry that something changed to non-desired behavior for you. Without a in-depth analysis between your commit tree and the resulting changelog, I am limited to only guessing what likely is the cause. Since you were able to narrow it to ### Bug Fixes
- changelog: ignore commit exclusion when a commit causes a version bump ([e8f886e](https://github.com/python-semantic-release/python-semantic-release/commit/e8f886ef2abe8ceaea0a24a0112b92a167abd6a9)) When you open the commit link, you will see the following comment in the code. # Skip excluded commits except for any commit causing a version bump
# Reasoning: if a commit causes a version bump, and no other commits
# are included, then the changelog will be empty. Even if ther was other
# commits included, the true reason for a version bump would be missing. I see that this is in fact the point of confusion, because after looking at your configuration you have all those tags that you want to ignore as commits that cause a version bump. Maybe it would make more sense for PSR to re-evaluate all the parsed commit objects relative to a single version to be ok to exclude commits that are not the single cause of the bump. If you find that all your occurrences are groups of commits that all cause a patch version. However, if all the commits are the same bump and they all are excluded then we have the same problem detailed above and I would throw out the re-evaluation result. |
Just to offer a recommendation to your configuration, it is my opinion that you should only trigger a release for the following for most types of projects: minor_tags = ["feat"]
patch_tags = ["fix", "perf"] My rationale is based on the fact that all other tags essentially do not change the functionality of the code that the user receives. You have to ask, Why would you release it (if he/she is using dependabot or something similar) which ends up notifying the end user to update if it doesn't actually improve their runtime use? Updating and upgrading is a cumbersome step for most who take the due diligence to validate their updates so it is more considerate of the developer to not release for all change types. This especially applies to the commit type of
As for All in all, as long as you have all the alternates in the |
Hello, Thank you for this very interesting feedback. I will need to study all of this. As requested in your first message, here is an extract from the commits and the changelog on a test project:
We see that the "docs" that I commit are not in the CHANGELOG.md file. |
Thanks! It confirms what I thought once I saw your config about half way through my first answer. Hopefully my insight was helpful. I will consider a re-eval of the set of commits as I didn't previously. |
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Description
Hello,
Some time ago, I updated Python Semantic Release from version 9.11.1 to 9.21.0 (I know that’s quite a jump). At first glance, I didn't encounter any problems, and I especially noticed that the default changelog had improved significantly.
However, I didn't realize immediately that since this update, I see all the commits in the changelog, including those that I exclude.
I didn't notice anything significant in the release notes, but I might have missed the information.
I reverted to intermediate versions and I see this behavior starting from version 9.12.0 of Python Semantic Release.
Expected behavior
Only feat and fix commit are in my CHANGELOG.md file
Actual behavior
All commit messages are in the CHANGELOG.md, even those I exclude in config file
Environment
Configuration
Semantic Release Configuration
The text was updated successfully, but these errors were encountered: