https://github.com/remarkablemark/commitlint
📓 Lint commit messages with GitHub Actions.
https://github.com/remarkablemark/commitlint
commit commit-message commitlint conventional-commits github-actions lint
Last synced: 9 months ago
JSON representation
📓 Lint commit messages with GitHub Actions.
- Host: GitHub
- URL: https://github.com/remarkablemark/commitlint
- Owner: remarkablemark
- License: mit
- Created: 2023-08-06T21:07:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-25T03:06:04.000Z (10 months ago)
- Last Synced: 2025-03-25T05:46:23.142Z (9 months ago)
- Topics: commit, commit-message, commitlint, conventional-commits, github-actions, lint
- Homepage: https://github.com/marketplace/actions/lintcommit
- Size: 31.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# commitlint
[](https://github.com/remarkablemark/commitlint/releases)
[](https://github.com/remarkablemark/commitlint/actions/workflows/test.yml)
[](https://opensource.org/licenses/MIT)
📓 [Lint commit messages](https://commitlint.js.org/) with GitHub Actions.
## Quick Start
```yaml
# .github/workflows/commitlint.yml
name: commitlint
on: push
jobs:
commitlint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Commitlint
uses: remarkablemark/commitlint@v1
with:
checkout: true
```
## Usage
Validate last commit message or all commit messages in a pull request:
```yaml
- uses: remarkablemark/commitlint@v1
with:
checkout: true
```
See [action.yml](action.yml)
## Inputs
### `checkout`
**Optional**: Whether to checkout the repository:
```yaml
- uses: remarkablemark/commitlint@v1
with:
checkout: true
```
Omit this input if the repository has already been checked out with all of the history:
```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: remarkablemark/commitlint@v1
```
### `config`
**Optional**: The config to enforce conventional commits. Defaults to [`@commitlint/config-conventional`](https://www.npmjs.com/package/@commitlint/config-conventional):
```yaml
- uses: remarkablemark/commitlint@v1
with:
config: '@commitlint/config-angular'
```
### `from`
**Optional**: The lower end of the commit range to lint. Defaults to `HEAD~1`:
```yaml
- uses: remarkablemark/commitlint@v1
with:
from: HEAD~
```
### `version`
**Optional**: The version of [`@commitlint/cli`](https://www.npmjs.com/package/@commitlint/cli). Defaults to `latest`:
```yaml
- uses: remarkablemark/commitlint@v1
with:
version: 19.8.0
```
## License
[MIT](LICENSE)