Shared actions available to both public and private repositories
- uses: Kong/public-shared-actions/<action-name>@<tag>
For example:
- uses: Kong/public-shared-actions/code-build-actions/build-js-sdk@v1.6.0
This guide will help you install and configure Lefthook to enforce commit message standards locally.
Lefthook is already listed within dev dependencies in the package.json file. Run pnpm install
to install all the dependencies.
Refer to the official Lefthook installation guide for platform-specific instructions.
This repo should already contain a lefthook.yml
configuration file in the root directory. The configuration in the lefthook.yml file enforces commit message linting using Commitlint.
Package.json runs the below command as part of pnpm install
to sync the Lefthook configuration with your Git hooks:
lefthook run pre-commit
To verify that Lefthook is correctly set up:
-
Stage a file for commit:
git add .
-
Attempt to commit with an invalid message:
git commit -m "Test commitlint"
You should see errors like:
- ✖ subject may not be empty
- ✖ type may not be empty
- ✖ scope may not be empty
-
Test with a valid commit message:
git commit -m "feat(ci): test commitlint for scope"
This should pass without any issues.
- Ensure that all developers in your team follow this setup to maintain consistent commit message standards.
- Refer to the Lefthook Usage Guide for more advanced configurations and usage scenarios.
By setting up Lefthook, you ensure that all developers adhere to the commit message conventions..