-
-
Notifications
You must be signed in to change notification settings - Fork 641
33 lines (26 loc) · 1 KB
/
pr-title.yml
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: ✅ Check PR Title
on:
pull_request:
types: [opened, edited]
permissions:
pull-requests: write
jobs:
lint-pr-title:
name: Check PR Title
runs-on: ubuntu-latest
if: ${{ github.event.action == 'opened' || github.event.changes.title != null }}
steps:
- name: 📥 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Only fetch the config file from the repository
sparse-checkout-cone-mode: false
sparse-checkout: |
commitlint.config.js
- name: 📦 Install dependencies
run: npm install --global @commitlint/config-conventional commitlint
- name: 🔍 Check PR title with commitlint
env:
PR_TITLE: ${{ github.event.pull_request.title }}
HELP_URL: https://github.com/material-extensions/vscode-material-icon-theme/blob/main/CONTRIBUTING.md#conventional-pull-request-titles
run: echo "$PR_TITLE" | npx commitlint --help-url $HELP_URL