Inserts a commit prefix based on:
- The branch name
- The changed project files
For example, for a checked out a branch called 1234-a-new-feature, and the following changes:
modules/module1/file.txt
The tool can be configured to write a commit message prefix: #1234 [module1]. If no issue ID is present in the branch, none is inserted.
The commit prefix is inserted when pressing the 'm' icon in the commit tool window.
Alternatively, automatic commit prefix can be toggled in Monorepo Tools > Auto Commit Message.
- Open File > Settings > Monorepo Tools
- Configure 'Folder Levels'
- This is how many folders that should be removed from a path. E.g. for a file
modules/submodules/submodule1, a folder level formodulesand level2, will removemodules/submodulesand insert[submodule1], whereas a level of1will only removemodulesand insert[submodules]. - This is useful as the whole folder structure needn't be written into a config.
- This is how many folders that should be removed from a path. E.g. for a file
- Configure 'Expand folders'
- This is what folders to keep in the path to keep, e.g. if the parent folder should still be part of the project name. For a file
modules/module1, and an expansion formodulesis set, the prefix will be[modules/module1].
- This is what folders to keep in the path to keep, e.g. if the parent folder should still be part of the project name. For a file
- Configure root folder name. If any changes are made in the root folder, a custom name can be specified to insert in the commit prefix. E.g. a file
./file.txt, the default prefix will be[root].