forked from dydxprotocol/v4-web
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (28 loc) · 1022 Bytes
/
commitlint.yml
File metadata and controls
33 lines (28 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: pr-name-linter
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up pnpm
uses: dydxprotocol/setup-pnpm@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm install @commitlint/config-conventional
echo "module.exports = {extends: ['@commitlint/config-conventional'], rules: { 'subject-case': [0,'always',['sentence-case']],'header-max-length': [2, 'always', 120], 'body-max-line-length': [0, 'always', 120] }};" > commitlint.config.js
- name: Lint the PR Title
run: |
echo "${PR_TITLE}" | pnpx commitlint --config commitlint.config.ts
env:
PR_TITLE: '${{ github.event.pull_request.title }}'