Skip to content

Commit c752500

Browse files
authored
chore(ci): change conventional commits to the same job ran in swift (#1268)
1 parent afcaaf1 commit c752500

File tree

2 files changed

+14
-124
lines changed

2 files changed

+14
-124
lines changed

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

Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,28 @@
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:
10-
branches:
11-
- main
12-
- release/*
136
types:
147
- opened
158
- edited
16-
- reopened
17-
- ready_for_review
9+
- synchronize
1810

1911
permissions:
12+
pull-requests: write
2013
contents: read
2114

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

0 commit comments

Comments
 (0)