-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 981 Bytes
/
Copy pathconventions.yml
File metadata and controls
33 lines (30 loc) · 981 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: Commit conventions
on:
pull_request:
types: [opened, edited, reopened, synchronize]
permissions:
contents: read
jobs:
conventions:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- name: Check branch commits
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: pnpm exec commitlint --from "$BASE_SHA" --to "$HEAD_SHA" --verbose
- name: Check squash merge title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: printf '%s\n' "$PR_TITLE" | pnpm exec commitlint --verbose