Repository navigation
Provide a bump level setting for path filters in monorepos #1425
Description
Activity
- addedfeatureA new feature or a feature requestA new feature or a feature requesttriagewaiting for initial maintainer reviewwaiting for initial maintainer review
on Jan 29, 2026 Hi, so I have a first try at a custom parser for this here, with an example of the configuration used here. Not sure if this is of any interest to you?
I've done some manual testing and I can force the bump level for a given path now. I need to try and test some of the edge cases for when multiple paths and scopes are defined. I'll report back next week.
This issue is stale because it has not been confirmed or planned by the maintainers and has been open 90 days with no recent activity. It will be closed in 7 days, if no further activity occurs. Thank you for your contributions.
OK, before this goes stale, I want to report that I've been successfully using my updated parser in the dtocean repository. The configuration got a bit more complex, as I needed to set the bump level required to trigger a release along with the maximum bump level setting. Below is a snippet of one of the most complex configurations I created:
[release.commit_parser_options] scope_prefix = "dtocean-app" [tool.semantic_release.commit_parser_options.path_filters.main] paths = ["."] [tool.semantic_release.commit_parser_options.path_filters.polite-config] paths = ["../polite-config"] max_bump_level = 2 trigger_bump_level = 4 [tool.semantic_release.commit_parser_options.path_filters.mdo-engine] paths = ["../mdo-engine"] max_bump_level = 2 trigger_bump_level = 4 [tool.semantic_release.commit_parser_options.path_filters.dtocean-core] paths = ["../dtocean-core"] max_bump_level = 2 trigger_bump_level = 4 [tool.semantic_release.commit_parser_options.path_filters.dtocean-qt] paths = ["../dtocean-qt"] max_bump_level = 2 trigger_bump_level = 4
Note that this could be simplified as:
[release.commit_parser_options] scope_prefix = "dtocean-app" [tool.semantic_release.commit_parser_options.path_filters.main] paths = ["."] [tool.semantic_release.commit_parser_options.path_filters.modules] paths = [ "../polite-config", "../mdo-engine", "../dtocean-core", "../dtocean-qt", ] max_bump_level = 2 trigger_bump_level = 4
I chose to use a configuration for each module dependency for future flexibility.
Feature Request
Description
I would like to be able to set a fixed bump level for a given path filter when using ConventionalCommitMonorepoParser. Something along the lines of:
With this configuration in place, the parser should then force any commits found by this filter with a higher bump level to the given maximum.
Use cases
My motivation for this is that I have packages in my monorepo that are dependant on other packages.
For example:
pkg-adepends onpkg-bpkg-bgets an update, I also want to releasepkg-awith the new version ofpkg-bas a dependencypkg-ato watchpkg-bfor changespkg-bare major or breakingpkg-ato also be major or breakingIn the above scenario, I just want the bump to
pkg-ato be minor, unless I have made some changes specific topkg-athat warrant a higher level.Note that I am using a poetry plugin to automatically rewrite path dependencies to their released version when building for PyPI. I therefore don't have to make any changes to
pkg-awhenpkg-bupdates for the dependency specification to be modified.Possible implementation
Maybe by overriding the bump level returned from the parse_message method?
Alternative solutions
I've tried to think of a way of setting up the current configuration where I can get a similar result, but I have not had any success.
(EDIT: I've just thought about watching just the
pyproject.tomlfile of the other project, but I would have to be careful to exclude changes to it from any commits with higher level types.)Any help is gratefully received,
Thanks,
Mat
NEXT DAY EDIT: I just read the custom parser documentation, so I will have a go at rolling my own with this functionality.