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 PR"
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@v5
19+ env :
20+ GITHUB_TOKEN : ${{ secrets.API_TOKEN }}
21+ with :
22+ wip : true
23+ # Configure additional validation for the subject based on a regex.
24+ # This example ensures the subject doesn't start with an uppercase character.
25+ subjectPattern : ^\[\d{19}\].*
26+ # If `subjectPattern` is configured, you can use this property to override
27+ # the default error message that is shown when the pattern doesn't match.
28+ # The variables `subject` and `title` can be used within the message.
29+ subjectPatternError : |
30+ The subject "{subject}" found in the pull request title "{title}"
31+ didn't match the configured pattern. Please ensure that the subject
32+ doesn't start with `[${ticket-id}]`.
You can’t perform that action at this time.
0 commit comments