forked from zkpassport/zkpassport-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.56 KB
/
check-pr.yml
File metadata and controls
44 lines (40 loc) · 1.56 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
43
44
name: Check PR title
on:
pull_request_target:
types: [opened, reopened, edited, synchronize]
permissions:
pull-requests: read
jobs:
main:
name: Check PR title
runs-on: ubuntu-latest
steps:
# For ci/build types: scope is optional
- name: Validate PR title (ci/build - no scope required)
if: startsWith(github.event.pull_request.title, 'ci:') || startsWith(github.event.pull_request.title, 'build:')
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
ci
build
requireScope: false
scopes: |
(registry|explorer|registry-sdk|sdk|utils|workspace)(,(registry|explorer|registry-sdk|sdk|utils|workspace))*
subjectPattern: ^[A-Z].+$
subjectPatternError: |
The subject must start with an uppercase letter.
# For all other types: scope is required
- name: Validate PR title (all other types - scope required)
if: (!(startsWith(github.event.pull_request.title, 'ci:') || startsWith(github.event.pull_request.title, 'build:')))
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
scopes: |
(registry|explorer|registry-sdk|sdk|utils|workspace)(,(registry|explorer|registry-sdk|sdk|utils|workspace))*
subjectPattern: ^[A-Z].+$
subjectPatternError: |
The subject must start with an uppercase letter.