File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint pull request title
2+
3+ on :
4+ pull_request_target :
5+ types :
6+ - opened
7+ - edited
8+ - synchronize
9+
10+ permissions :
11+ pull-requests : read
12+
13+ jobs :
14+ main :
15+ name : Validate PR title
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : amannn/action-semantic-pull-request
19+ env :
20+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21+ with :
22+ # Configure that a scope must always be provided.
23+ requireScope : false
24+ # Configure additional validation for the subject based on a regex.
25+ # Ensures that the subject doesn't start with an uppercase character.
26+ subjectPattern : ^[A-Z].*$
27+ # If `subjectPattern` is configured, you can use this property to override
28+ # the default error message that is shown when the pattern doesn't match.
29+ # The variables `subject` and `title` can be used within the message.
30+ subjectPatternError : |
31+ The subject "{subject}" found in the pull request title "{title}" doesn't match the configured pattern.
32+ Please ensure that the subject doesn't start with a lowercase character.
You can’t perform that action at this time.
0 commit comments