Skip to content

Commit c933053

Browse files
committed
fix(ci): simplify PR title check with direct action
1 parent f9c3505 commit c933053

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/pr-title.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
name: PR Title Check
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types:
66
- opened
77
- edited
88
- synchronize
99

1010
permissions:
11-
contents: read
1211
pull-requests: write
13-
statuses: read
14-
checks: read
12+
contents: read
1513

1614
jobs:
1715
check-title:
1816
runs-on: ubuntu-latest
1917
steps:
20-
- uses: straw-hat-team/github-actions-workflows/semantic-pull-request@master
18+
- uses: amannn/action-semantic-pull-request@v5.4.0
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121
with:
22-
github-token: ${{ github.token }}
22+
types: |
23+
feat
24+
fix
25+
refactor
26+
chore
27+
revert
28+
requireScope: false
29+
subjectPattern: ^(?![A-Z]).+$
30+
subjectPatternError: |
31+
The subject "{subject}" found in the pull request title "{title}"
32+
didn't match the configured pattern. Please ensure that the subject
33+
doesn't start with an uppercase character.

0 commit comments

Comments
 (0)