-
Notifications
You must be signed in to change notification settings - Fork 3.9k
42 lines (41 loc) · 1.08 KB
/
Copy pathconventional-label.yml
File metadata and controls
42 lines (41 loc) · 1.08 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
on:
pull_request_target:
types:
- opened
- edited
name: commit lint & label
jobs:
lint:
runs-on: ubuntu-latest
env:
PR_TITLE: ${{ github.event.pull_request.title }}
permissions:
pull-requests: read
contents: read
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm ci
- name: Check PR title
id: check-pr-title
run: echo "$PR_TITLE" | npx commitlint --verbose
label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: bcoe/conventional-release-labels@v1
with:
type_labels:
'{"feat": "PR: feature", "fix": "PR: fix", "breaking": "breaking
change", "chore": "PR: chore", "docs": "PR: docs", "refactor": "PR:
refactor", "revert": "PR: revert", "deprecate": "deprecation"}'
ignored_types: '[]'