ci: lint commit messages (#31625)

This commit is contained in:
Ankush Menat 2022-07-19 12:00:53 +05:30 committed by GitHub
parent a6ff4db2ec
commit 885e731872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 0 deletions

30
.github/workflows/semantic-commits.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Semantic Commits
on:
pull_request: {}
permissions:
contents: read
concurrency:
group: commitcheck-erpnext-${{ github.event.number }}
cancel-in-progress: true
jobs:
commitlint:
name: Check Commit Titles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 200
- uses: actions/setup-node@v3
with:
node-version: 14
check-latest: true
- name: Check commit titles
run: |
npm install @commitlint/cli @commitlint/config-conventional
npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}

View File

@ -15,5 +15,10 @@
"dependencies": {
"html2canvas": "^1.1.4",
"onscan.js": "^1.5.2"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}