Skip to content

Commit 3a2f054

Browse files
authored
ci: add verifying pr title (#14)
1 parent 61e86e8 commit 3a2f054

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/pr-title.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Title
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- edited
10+
11+
jobs:
12+
verify_title:
13+
name: Verify PR Title
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event.action != 'edited' || github.event.changes.title }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
cache: npm
24+
- name: Install Packages
25+
run: npm ci
26+
- name: Run Commitlint
27+
run: echo "${{ github.event.pull_request.title }}" | npx --no-install commitlint

0 commit comments

Comments
 (0)