ci: add check for pr title (#1973)

* chore: addd lint_pr workflow

* ci: add workflow for commitlint on pr title

* ci: install and use config-conventional

* ci: add npx so command is found

* ci: update action name
This commit is contained in:
Matthew Russell 2022-11-08 09:38:30 -06:00 committed by GitHub
parent 205f348a01
commit 12ae6477a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

21
.github/workflows/lint_pr.yml vendored Normal file
View File

@ -0,0 +1,21 @@
---
name: Verify PR title
on:
pull_request:
types: [opened, edited]
jobs:
lint_pr:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 16
id: Node
uses: actions/setup-node@v2
with:
node-version: 16.14.0
- name: Install commitlint cli and config
run: npm install @commitlint/cli @commitlint/config-conventional
- name: Create config
run: echo "module.exports = {extends:['@commitlint/config-conventional']};" > commitlint.config.js
- name: Check PR title
run: echo "${{ github.event.pull_request.title }}" | npx commitlint