1
+ name : PR Title
2
+ on :
3
+ pull_request :
4
+ types : [opened, edited, synchronize, reopened]
5
+
6
+ jobs :
7
+ validate :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : amannn/action-semantic-pull-request@v5
11
+ env :
12
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
13
+ with :
14
+ # Configure which types are allowed
15
+ types : |
16
+ feat
17
+ fix
18
+ chore
19
+ docs
20
+ style
21
+ refactor
22
+ perf
23
+ test
24
+ ci
25
+ revert
26
+ # Configure which scopes are allowed
27
+ # scopes: |
28
+ # core
29
+ # ui
30
+ # Configure that a scope must always be provided
31
+ requireScope : false
32
+ # Configure additional validation for the subject based on a regex.
33
+ # This example ensures the subject doesn't start with an uppercase character.
34
+ subjectPattern : ^(?![A-Z]).+$
35
+ # If `subjectPattern` is configured, you can use this property to override
36
+ # the default error message that is shown when the pattern doesn't match.
37
+ # The variables `subject` and `title` can be used within the message.
38
+ subjectPatternError : |
39
+ The subject "{subject}" found in the pull request title "{title}"
40
+ didn't match the configured pattern. Please ensure that the subject
41
+ doesn't start with an uppercase character.
42
+ # For work-in-progress PRs you can typically use draft pull requests
43
+ # from GitHub. However, private repositories on the free plan don't have
44
+ # this option and therefore this action allows you to opt-in to using the
45
+ # special "[WIP]" prefix to indicate this state. This will avoid the
46
+ # validation of the PR title and the pull request checks remain pending.
47
+ # Note that a second check will be reported if this is enabled.
48
+ wip : true
49
+ # When using "Squash and merge" on a PR with only one commit, GitHub
50
+ # will suggest using that commit message instead of the PR title for the
51
+ # merge commit, and it's easy to commit this by mistake. Enable this
52
+ # option to also validate the commit message for one commit PRs.
53
+ validateSingleCommit : true
0 commit comments