https://github.com/aisevim/commit-harmonizer-action
:octocat: Github Action! Enforce conventional commit format for commit and PR titles with clear error output :white_check_mark:
https://github.com/aisevim/commit-harmonizer-action
conventional-commits github github-actions
Last synced: 5 months ago
JSON representation
:octocat: Github Action! Enforce conventional commit format for commit and PR titles with clear error output :white_check_mark:
- Host: GitHub
- URL: https://github.com/aisevim/commit-harmonizer-action
- Owner: aisevim
- License: mit
- Created: 2023-11-15T13:57:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T10:19:18.000Z (about 2 years ago)
- Last Synced: 2024-04-20T11:31:29.505Z (about 2 years ago)
- Topics: conventional-commits, github, github-actions
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/commit-harmonizer
- Size: 2.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Commit Harmonizer
[](https://github.com/aisevim/commit-harmonizer-action)
[](https://github.com/aisevim/commit-harmonizer-action/tags)
Enforce [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) format for **Commit** and **PR titles** with clear error output
## Inputs
| Input | Description | Required | Default |
| ---------------- | ----------------------------------- | -------- | ---------------------------------- |
| `github-token` | Token for repository access | true | |
| `check-pr-title` | Enable PR title checking | false | true |
| `check-commits` | Enable last commit message checking | false | true |
| `bypass-checks` | A regex to bypass checks | false | `^wip\|Wip\|Merge\|Revert\|revert` |
## Usage
### On PR Title Edit and Last Commit Change
```yaml
name: Pull Request Message Checker
on:
pull_request:
types:
- edited
- opened
- synchronize
- reopened
jobs:
check-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check Commit Message
uses: aisevim/commit-harmonizer-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
```
### On PR Title Edit
```yaml
name: Pull Request Title Checker
on:
pull_request:
types:
- edited
jobs:
check-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check Commit Message
uses: aisevim/commit-harmonizer-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
check-commits: false
```
### On Last Commit Change and disable bypass
```yaml
name: Pull Request Commit Message Checker
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
check-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check Commit Message
uses: aisevim/commit-harmonizer-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
check-pr-title: false
bypass-checks: ".+"
```
## Outputs Examples



## License
This project is licensed under the [MIT License](LICENSE).
## Release Notes
See [CHANGELOG.md](CHANGELOG.md) for details on each release.