diff --git a/.github/workflows/check-commits.yml b/.github/workflows/check-commits.yml index 49388949..2a910035 100644 --- a/.github/workflows/check-commits.yml +++ b/.github/workflows/check-commits.yml @@ -33,3 +33,8 @@ jobs: - name: "📜 Validate commit messages" run: npx --no-install commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose + + - name: "📜 Validate PR title (used as squash commit message)" + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: printf '%s\n' "$PR_TITLE" | npx --no-install commitlint --verbose diff --git a/commitlint.config.js b/commitlint.config.js index 25d70148..40324c31 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -7,7 +7,7 @@ module.exports = { }, rules: { 'subject-case': [0], - 'subject-full-stop': [0], + 'subject-full-stop': [2, 'always', '.'], 'header-max-length': [2, 'always', 78], 'scope-enum': [ 2,