Skip to content

Commit

Permalink
ci: validate PR title with conventional commits (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
baruchiro authored Jun 6, 2023
1 parent 8718327 commit 7ed9eda
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate Conventional Commit title

on:
pull_request:
types: [opened, edited, synchronize, reopened]

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

0 comments on commit 7ed9eda

Please sign in to comment.