This repository was archived by the owner on Apr 7, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,12 +27,17 @@ jobs:
2727 const title = context.payload.pull_request.title;
2828 const labels = context.payload.pull_request.labels.map(l => l.name);
2929 if (labels.includes('dev')) {
30- console.log('Skipping PR title check due to dev label.');
31- return;
32- }
33- const regex = /^(feat|fix|refactor|doc|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
34- if (!regex.test(title)) {
35- core.setFailed(
36- `PR title "${title}" does not match the expected conventional commit format`
37- );
30+ const regex = /^(?!feat|fix|refactor|doc|perf|style|test|chore|revert)[a-z].*$/;
31+ if (!regex.test(title)) {
32+ core.setFailed(
33+ `PR title "${title}" does not match the commit format for non-user-facing changes`
34+ );
35+ }
36+ } else {
37+ const regex = /^(feat|fix|refactor|doc|perf|style|test|chore|revert)!?:[ ][a-z].*$/;
38+ if (!regex.test(title)) {
39+ core.setFailed(
40+ `PR title "${title}" does not match the expected conventional commit format for user-facing changes`
41+ );
42+ }
3843 }
You can’t perform that action at this time.
0 commit comments