https://github.com/oliversalzburg/action-commit-validator
Validate git commit messages against conventional commit expectations.
https://github.com/oliversalzburg/action-commit-validator
ci conventional-commits git github-actions
Last synced: about 1 year ago
JSON representation
Validate git commit messages against conventional commit expectations.
- Host: GitHub
- URL: https://github.com/oliversalzburg/action-commit-validator
- Owner: oliversalzburg
- License: mit
- Created: 2024-05-18T14:09:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-14T16:18:24.000Z (about 1 year ago)
- Last Synced: 2025-04-15T07:19:02.513Z (about 1 year ago)
- Topics: ci, conventional-commits, git, github-actions
- Language: TypeScript
- Homepage:
- Size: 2.09 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Commit Validator Action
[](https://github.com/oliversalzburg/action-commit-validator/actions/workflows/pre-release.yml)
Validate commit messages against [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) expectations.
## Usage
Call the action from a workflow.
```yml
name: Pull Request
on:
pull_request:
jobs:
qa:
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: oliversalzburg/action-commit-validator@v0.0.4
with:
accept-breaking-changes: false
accept-emoji: false
accepted-scopes: |
api
build
deps
deps-dev
accepted-types: |
chore
ci
docs
feat
fix
refactor
test
repo-token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| ----------------------------------------------------------------------------------------------------- | ------ | -------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| [accept-breaking-changes](#input_accept-breaking-changes) | string | false | `"true"` | Is the breaking change indicator
(`!`) allowed? |
| [accept-emoji](#input_accept-emoji) | string | false | `"true"` | Are emoji allowed? |
| [accepted-scopes](#input_accepted-scopes) | string | false | | Only accept these scopes. Provide
as multi-line string, each type
on it's own line. By
default, all scopes are accepted. |
| [accepted-types](#input_accepted-types) | string | false | `"feat"`
`"fix"`
| Only accept these type prefixes.
Provide as multi-line string, each
type on it's own line. |
| [repo-token](#input_repo-token) | string | true | | Needs `secrets.GITHUB_TOKEN` to talk to
the API. |
| [require-conventional](#input_require-conventional) | string | false | `"true"` | Require all commits to follow
the Conventional Commits specification |
| [require-scope](#input_require-scope) | string | false | `"false"` | Require all commits to specify
a scope. |
## Release Process
```shell
npm version patch --message "chore: Version bump %s"
```