File tree Expand file tree Collapse file tree 2 files changed +14
-124
lines changed Expand file tree Collapse file tree 2 files changed +14
-124
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- name : Check pull requests
1+ # See https://github.com/amannn/action-semantic-pull-request
2+ name : ' PR Title is Conventional'
23
34on :
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
1911permissions :
12+ pull-requests : write
2013 contents : read
2114
2215jobs :
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.
You can’t perform that action at this time.
0 commit comments