diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49f4ca5..e477a2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,17 @@ jobs: const title = context.payload.pull_request.title; const labels = context.payload.pull_request.labels.map(l => l.name); if (labels.includes('dev')) { - console.log('Skipping PR title check due to dev label.'); - return; - } - const regex = /^(feat|fix|refactor|doc|perf|style|test|chore|revert)!?:[ ][a-z].*$/; - if (!regex.test(title)) { - core.setFailed( - `PR title "${title}" does not match the expected conventional commit format` - ); + const regex = /^(?!feat|fix|refactor|doc|perf|style|test|chore|revert)[a-z].*$/; + if (!regex.test(title)) { + core.setFailed( + `PR title "${title}" does not match the commit format for non-user-facing changes` + ); + } + } else { + const regex = /^(feat|fix|refactor|doc|perf|style|test|chore|revert)!?:[ ][a-z].*$/; + if (!regex.test(title)) { + core.setFailed( + `PR title "${title}" does not match the expected conventional commit format for user-facing changes` + ); + } }