forked from elementor/elementor
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 980 Bytes
/
pr-linter.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
name: PR Linter
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
merge_group:
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
pr_name_lint:
runs-on: ubuntu-latest
if: startsWith( github.repository, 'elementor/' )
steps:
- uses: actions/checkout@v4
- name: Install Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Dependencies
if: ${{ github.event.pull_request.title != null }}
run: npm install --no-package-lock --no-save @commitlint/[email protected] @commitlint/[email protected]
- name: Run PR name linter
if: ${{ github.event.pull_request.title != null }}
run: echo "${{ github.event.pull_request.title }}" | npx commitlint