Skip to content

Commit

Permalink
ci: check commit messages with commitlint (frappe#17541)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush authored Jul 19, 2022
1 parent 6f8be47 commit 8ac7e32
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/semantic-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Semantic Commits

on:
pull_request: {}

permissions:
contents: read

concurrency:
group: commitcheck-frappe-${{ 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: 0

- 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 }}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,10 @@
"snyk": true,
"nyc": {
"report-dir": ".cypress-coverage"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}

0 comments on commit 8ac7e32

Please sign in to comment.