Skip to content

Commit

Permalink
ci: lint pull request title (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg authored Nov 2, 2023
1 parent 34738f5 commit 875ebde
Show file tree
Hide file tree
Showing 5 changed files with 1,270 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ on:
branches: main

jobs:
commitlint:
runs-on: ubuntu-latest
name: commitlint
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v2
- name: Install Deps
run: yarn install
- name: Lint PR Title
run: echo "${{ github.event.pull_request.title }}" | yarn commitlint

tests:
runs-on: ubuntu-latest
name: Test (${{matrix.elixir}}/${{matrix.otp}})
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ result
# Ignore dialyzer plt files
/priv/plts/*.plt
/priv/plts/*.plt.hash
node_modules
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
}
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"scripts": {
"commitlint": "commitlint"
},
"dependencies": {
"@commitlint/config-conventional": "^18.1.0",
"commitlint": "^18.2.0"
}
}
Loading

0 comments on commit 875ebde

Please sign in to comment.