Skip to content

Commit 6325b0c

Browse files
authored
ci: only check pr title reference on feat type
1 parent cc967a6 commit 6325b0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/pr-title-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
run: |
1616
npm install @commitlint/config-conventional
1717
npm install commitlint@latest
18-
echo "module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'references-empty': [2, 'never'] }};" > commitlint.config.js
18+
echo "module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'issue-references': [2, 'always'] }, plugins: [{ rules: { 'issue-references': ({type, references}) => [!(type === 'feat' && references.length === 0), 'Feature must contain issue references'] } } ] };" > commitlint.config.js
1919
- name: "Lint: Pull request title"
2020
env:
2121
PR_TITLE: ${{ github.event.pull_request.title }}

0 commit comments

Comments
 (0)