Skip to content

Commit

Permalink
feat: add pull request title check (#62)
Browse files Browse the repository at this point in the history
This PR adds a lint check for pull request titles to ensure they conform to the conventional commits specification
  • Loading branch information
StriderDM committed Oct 5, 2021
1 parent 75a6456 commit a5defb7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: install
run: |
npm install -g @commitlint/cli @commitlint/config-conventional
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
- name: lint
run: |
echo "${{github.event.pull_request.title}}" | commitlint

0 comments on commit a5defb7

Please sign in to comment.