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