1+ name : ' Lint PR title preview (current branch, all options specified)'
2+ on :
3+ pull_request :
4+ types :
5+ - opened
6+ - edited
7+ - synchronize
8+
9+ jobs :
10+ main :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ pull-requests : read
14+ steps :
15+ - uses : actions/checkout@v5
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : 24
19+ - run : yarn install
20+ - run : yarn build
21+ - uses : ./
22+ env :
23+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24+ with :
25+ # Configure which types are allowed (newline-delimited).
26+ # Default: https://github.com/commitizen/conventional-commit-types
27+ types : |
28+ fix
29+ feat
30+ # Configure which scopes are allowed (newline-delimited).
31+ # These are regex patterns auto-wrapped in `^ $`.
32+ scopes : |
33+ core
34+ ui
35+ JIRA-\d+
36+ # Configure that a scope must always be provided.
37+ requireScope : false
38+ # Configure which scopes are disallowed in PR titles (newline-delimited).
39+ # For instance by setting the value below, `chore(release): ...` (lowercase)
40+ # and `ci(e2e,release): ...` (unknown scope) will be rejected.
41+ # These are regex patterns auto-wrapped in `^ $`.
42+ disallowScopes : |
43+ release
44+ [A-Z]+
45+ # Configure additional validation for the subject based on a regex.
46+ # This example ensures the subject doesn't start with an uppercase character.
47+ subjectPattern : ^(?![A-Z]).+$
48+ # If `subjectPattern` is configured, you can use this property to override
49+ # the default error message that is shown when the pattern doesn't match.
50+ # The variables `subject` and `title` can be used within the message.
51+ subjectPatternError : |
52+ The subject "{subject}" found in the pull request title "{title}"
53+ didn't match the configured pattern. Please ensure that the subject
54+ doesn't start with an uppercase character.
55+ # The GitHub base URL will be automatically set to the correct value from the GitHub context variable.
56+ # If you want to override this, you can do so here (not recommended).
57+ # githubBaseUrl: https://github.com/api/v3
58+ # If the PR contains one of these newline-delimited labels, the
59+ # validation is skipped. If you want to rerun the validation when
60+ # labels change, you might want to use the `labeled` and `unlabeled`
61+ # event triggers in your workflow.
62+ ignoreLabels : |
63+ bot
64+ ignore-semantic-pull-request
65+ # If you're using a format for the PR title that differs from the traditional Conventional
66+ # Commits spec, you can use these options to customize the parsing of the type, scope and
67+ # subject. The `headerPattern` should contain a regex where the capturing groups in parentheses
68+ # correspond to the parts listed in `headerPatternCorrespondence`.
69+ # See: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#headerpattern
70+ headerPattern : ' ^(\w*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$'
71+ headerPatternCorrespondence : type, scope, subject
0 commit comments