This VS Code extension simplifies the process of creating a pre-commit interceptor to validate commit messages based on specified templates.
- Customize commit message templates interactively.
- Automatically generates pre-commit and commit-msg hooks.
- The commit-msg interceptor is pre-configured and ready for immediate use.
- The pre-commit interceptor is created empty, allowing for personalized customization based on specific needs and frameworks.
- Checks commit messages against required templates and task templates.
- Provides an example of a valid commit message for reference.
- Open Your Workspace:
- Launch your VS Code workspace.
- Configuration Setup:
- Navigate to the desired file for commit message configuration.
- Run the "Create Commit Msg Hook" command using the VS Code Command Palette.
- Interactive Setup:
- Follow the prompts to input required templates, task templates, and an example of a valid commit message.
- Automatic Configuration:
- The extension updates the file with specified templates and creates necessary hooks.
- Execution and Permissions:
- Make the pre-commit hook executable using the command:
chmod +x .husky/pre-commit.
- Make the pre-commit hook executable using the command:
- Node.js version 10.22.0 or higher.
- Husky must be installed in the project; the extension guides you through the installation process if not present.
- Install from Visual Studio Code Store:
- Install the extension from the Visual Studio Code store.
- Open Your Workspace:
- Launch your VS Code workspace.
- Configuration Setup:
- Run the "Create Commit Msg Hook" command to configure the hook.
The extension allows customization of required templates, task templates, and sample commit messages.
The appearance of the form will automatically change based on the selected theme in VS Code.
The extension supports multiple languages, including English, Russian, German, Polish, Chinese, and Lithuanian. The translation will automatically adapt based on the language setting in VS Code.
If you encounter any issues or have feedback, please create an issue on the GitHub repository.
Contributions are welcome! Fork the repository, make your changes, and submit a pull request.