Commit Message Hook Generator for VS Code
Overview
This VS Code extension simplifies the process of creating a pre-commit interceptor to validate commit messages based on specified templates.
Features
Interactive Configuration:
- Customize commit message templates interactively.
- Automatically generates pre-commit and commit-msg hooks.
Ready-to-Use Configuration:
- 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.
Message Validation:
- Checks commit messages against required templates and task templates.
- Provides an example of a valid commit message for reference.
Usage
- 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
.
Requirements
- 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.
Installation
- 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.
Configuration Options
The extension allows customization of required templates, task templates, and sample commit messages.
Appearance
The appearance of the form will automatically change based on the selected theme in VS Code.
Language Support
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.
Issues and Feedback
If you encounter any issues or have feedback, please create an issue on the GitHub repository.
Contribution
Contributions are welcome! Fork the repository, make your changes, and submit a pull request.