Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/netodevel/conventional-commits-checker
Check that all pull request commits are following convetional commits
https://github.com/netodevel/conventional-commits-checker
Last synced: about 1 month ago
JSON representation
Check that all pull request commits are following convetional commits
- Host: GitHub
- URL: https://github.com/netodevel/conventional-commits-checker
- Owner: netodevel
- License: mit
- Created: 2023-02-03T02:30:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-05T05:30:18.000Z (almost 2 years ago)
- Last Synced: 2024-09-16T22:54:50.788Z (2 months ago)
- Language: Shell
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# conventional-commits-checker
Check that all pull request commits are following conventional commits#### The default commit validation pattern is: `feat: #0000 - My Message commit`
# How to use
```yml
name: "Commit Lint"
on:
pull_request:
branches:
- main
- development
- staging
types:
- opened
- reopened
- labeled
- unlabeled
- edited
- synchronize
jobs:
commit-lint:
runs-on: ubuntu-latest
name: Validate all commits
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }} # your personal access token
fetch-depth: 0
- name: Conventional Commits Checker
uses: netodevel/[email protected]
id: commits-check
with: # do not change the order of params
target-branch: ${{ github.event.pull_request.base.ref }} #required
current-branch: ${{ github.event.pull_request.head.ref }} #required
pattern: '(feat|fix|ci|chore|docs|test|style|refactor): .{1,}$' #optional custom validation commit
```# Inputs
### target-branch
**Required** Need to get all commits, use always: `${{ github.event.pull_request.base.ref }}`
### current-branch
**Required** Need to get all commits, use always: `${{ github.event.pull_request.head.ref }}`### pattern
**Optional** Custom validation commit, eg: `(feat|fix|ci|chore|docs|test|style|refactor): .{1,}$`