Skip to content

Commit a1b5271

Browse files
authored
ci: adopt amannn/action-semantic-pull-request for validating PR titles (#671)
1 parent 5880b72 commit a1b5271

File tree

2 files changed

+19
-124
lines changed

2 files changed

+19
-124
lines changed

.github/workflows/conventional-commits-lint.js

Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,30 @@
1-
name: Check pull requests
1+
# See https://github.com/amannn/action-semantic-pull-request
2+
name: 'PR Title is Conventional'
23

34
on:
4-
push:
5-
branches-ignore: # Run the checks on all branches but the protected ones
6-
- main
7-
- release/*
8-
95
pull_request_target:
10-
branches:
11-
- main
12-
- release/*
136
types:
147
- opened
158
- edited
16-
- reopened
17-
- ready_for_review
9+
- synchronize
1810

1911
jobs:
20-
check-conventional-commits:
12+
main:
13+
name: Validate PR title
2114
runs-on: ubuntu-latest
22-
2315
steps:
24-
- uses: actions/checkout@v4
16+
- uses: amannn/action-semantic-pull-request@v5
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2519
with:
26-
sparse-checkout: |
27-
.github
28-
29-
- if: ${{ github.event_name == 'pull_request_target' }}
30-
run: |
31-
set -ex
32-
33-
node .github/workflows/conventional-commits-lint.js pr <<EOF
34-
${{ toJSON(github.event) }}
35-
EOF
36-
37-
- if: ${{ github.event_name == 'push' }}
38-
run: |
39-
set -ex
40-
41-
node .github/workflows/conventional-commits-lint.js push <<EOF
42-
${{ toJSON(github.event) }}
43-
EOF
20+
scopes: |
21+
realtime
22+
auth
23+
storage
24+
functions
25+
postgrest
26+
subjectPattern: ^(?![A-Z]).+$
27+
subjectPatternError: |
28+
The subject "{subject}" found in the pull request title "{title}"
29+
didn't match the configured pattern. Please ensure that the subject
30+
doesn't start with an uppercase character.

0 commit comments

Comments
 (0)