-
-
Notifications
You must be signed in to change notification settings - Fork 112
chore: add commitlint configuration and pre-commit hook for enforcing commit message standards #285
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
Merged
amondnet
merged 3 commits into
master
from
284-feat-add-commitlint-for-enforcing-conventional-commit-messages
Aug 28, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| npx --no -- commitlint --edit ${1} | ||
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # Contributing to Vercel Action | ||
|
|
||
| We welcome contributions to the Vercel Action project! This document provides guidelines and standards for contributing. | ||
|
|
||
| ## Development Setup | ||
|
|
||
| 1. Fork and clone the repository | ||
| 2. Install dependencies: `pnpm install` | ||
| 3. Run tests: `npm test` | ||
| 4. Run linter: `npm run lint` | ||
|
|
||
| ## Commit Message Guidelines | ||
|
|
||
| We use [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. This leads to more readable messages and enables automatic generation of the changelog. | ||
|
|
||
| ### Commit Message Format | ||
|
|
||
| Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a **type**, a **scope** and a **subject**: | ||
|
|
||
| ``` | ||
| <type>[optional scope]: <description> | ||
|
|
||
| [optional body] | ||
|
|
||
| [optional footer(s)] | ||
| ``` | ||
|
|
||
| ### Type | ||
|
|
||
| Must be one of the following: | ||
|
|
||
| - **build**: Changes that affect the build system or external dependencies | ||
| - **chore**: Other changes that don't modify src or test files | ||
| - **ci**: Changes to our CI configuration files and scripts | ||
| - **docs**: Documentation only changes | ||
| - **feat**: A new feature | ||
| - **fix**: A bug fix | ||
| - **perf**: A code change that improves performance | ||
| - **refactor**: A code change that neither fixes a bug nor adds a feature | ||
| - **revert**: Reverts a previous commit | ||
| - **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc) | ||
| - **test**: Adding missing tests or correcting existing tests | ||
|
|
||
| ### Examples | ||
|
|
||
| ```bash | ||
| # Feature with scope | ||
| feat(auth): add OAuth2 integration | ||
|
|
||
| # Bug fix | ||
| fix: resolve memory leak in deployment process | ||
|
|
||
| # Breaking change | ||
| feat: update to Vercel CLI v30 | ||
|
|
||
| BREAKING CHANGE: Minimum Node.js version is now 18 | ||
| ``` | ||
|
|
||
| ### Commitlint | ||
|
|
||
| This repository uses [commitlint](https://commitlint.js.org/) to ensure all commit messages follow our convention. The commit-msg hook will automatically validate your commit messages. | ||
|
|
||
| If your commit is rejected, please review the message format and ensure it follows the convention above. | ||
|
|
||
| ## Pull Request Process | ||
|
|
||
| 1. Ensure your PR title follows the Conventional Commits format | ||
| 2. Update the README.md with details of changes if needed | ||
| 3. Ensure all tests pass and linting is clean | ||
| 4. Request review from maintainers | ||
|
|
||
| ## Code Style | ||
|
|
||
| - We use ESLint with the Antfu config for code formatting and linting | ||
| - Run `npm run lint` to check your code | ||
| - Run `npm run lint:fix` to automatically fix issues | ||
|
|
||
| ## Testing | ||
|
|
||
| - Write tests for new features | ||
| - Ensure existing tests pass | ||
| - Run `npm test` before submitting PR | ||
|
|
||
| ## Questions? | ||
|
|
||
| Feel free to open an issue for any questions about contributing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export default { extends: ['@commitlint/config-conventional'] } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.