Skip to content
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

Filtering commits by path before version bump #1347

Open
dalbitresb12 opened this issue Jan 30, 2025 · 0 comments
Open

Filtering commits by path before version bump #1347

dalbitresb12 opened this issue Jan 30, 2025 · 0 comments

Comments

@dalbitresb12
Copy link

dalbitresb12 commented Jan 30, 2025

Description

Introduce an option (either in the configuration file or as a CLI argument) to filter the commits that will be considered for the version bump calculation. This feature would allow users to specify a path prefix, ensuring that only commits affecting files within the specified path are taken into account.

This feature would provide a basic way to handle version bumping in monorepos by allowing users to focus on changes within specific subdirectories and could be used by users until full support for monorepos is added to commitizen (I saw other issues mentioning other types of features for monorepo support so this could be used together with those other features).

Possible Solution

I went ahead and tried implementing my suggestion in a fork so that I could start testing it with an internal application (I did search for contributing guidelines, but I didn't look in the docs/ folder, so I didn't see this line before implementing, sorry).

Basically the changes I made are:

I can make a PR for this feature and also make any other changes as needed so that this feature can see the light of day :)

Additional context

You can see the test I implemented for an example of the feature working.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant