|
9 | 9 | runs-on: ubuntu-latest |
10 | 10 | steps: |
11 | 11 | - name: Validate PR title |
12 | | - uses: amannn/action-semantic-pull-request@v5 |
| 12 | + if: | |
| 13 | + !contains(github.event.pull_request.title, 'release') && |
| 14 | + !contains(github.event.pull_request.title, 'chore') |
| 15 | + uses: amannn/action-semantic-pull-request@v5 |
13 | 16 | env: |
14 | 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
15 | 18 | with: |
16 | 19 | # Configure that a scope must always be provided. |
17 | 20 | requireScope: true |
| 21 | + # Configure allowed commit types |
| 22 | + types: | |
| 23 | + feat |
| 24 | + fix |
| 25 | + docs |
| 26 | + style |
| 27 | + refactor |
| 28 | + perf |
| 29 | + test |
| 30 | + build |
| 31 | + ci |
| 32 | + revert |
| 33 | + release |
| 34 | + chore |
18 | 35 | # Configure additional validation for the subject based on a regex. |
19 | 36 | # This example ensures the subject doesn't start with an uppercase character. |
20 | 37 | subjectPattern: ^(?![A-Z]).+$ |
21 | | - # If `subjectPattern` is configured, you can use this property to |
22 | | - # override the default error message that is shown when the pattern |
23 | | - # doesn't match. The variables `subject` and `title` can be used |
| 38 | + # If `subjectPattern` is configured, you can use this property to |
| 39 | + # override the default error message that is shown when the pattern |
| 40 | + # doesn't match. The variables `subject` and `title` can be used |
24 | 41 | # within the message. |
25 | 42 | subjectPatternError: | |
26 | 43 | The subject "{subject}" found in the pull request title "{title}" didn't match the configured pattern. Please ensure that the subject doesn't start with an uppercase character. |
27 | | - # If the PR contains one of these newline-delimited labels, the |
28 | | - # validation is skipped. If you want to rerun the validation when |
29 | | - # labels change, you might want to use the `labeled` and `unlabeled` |
30 | | - # event triggers in your workflow. |
31 | | - ignoreLabels: | |
32 | | - release |
|
0 commit comments