-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (36 loc) · 1.07 KB
/
lint-pr.yml
File metadata and controls
43 lines (36 loc) · 1.07 KB
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
34
35
36
37
38
39
40
41
42
43
name: Lint PR Title
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
branches:
- staging
jobs:
commit-lint:
runs-on: ubuntu-latest
permissions:
packages: read
steps:
- name: Check out branch
uses: actions/checkout@v4
- name: Use pnpm
uses: pnpm/action-setup@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
scope: "dialpad"
env:
NODE_AUTH_TOKEN: ${{ github.token }}
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Lint pull request title
run: |
echo "The PR's title should adhere to the commit message convention."
echo "correct format: <type>(<scope>): <jira> <subject>"
echo "example: feat: DLT-123 add dialbot icon"
pnpm commitlint --verbose << EOF
${{ github.event.pull_request.title }}
EOF