diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 139feed..3b1748b 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -6,7 +6,6 @@ on: permissions: pull-requests: write - issues: write # Update issue labels jobs: lint-pr-title: @@ -23,7 +22,6 @@ jobs: # Only fetch the config file from the repository sparse-checkout-cone-mode: false sparse-checkout: | - .github/scripts/update-status-label.sh commitlint.config.js - name: 📦 Install dependencies @@ -33,11 +31,4 @@ jobs: id: title-check env: PR_TITLE: ${{ github.event.pull_request.title }} - HELP_URL: https://github.com/material-extensions/vscode-material-icon-theme/blob/main/CONTRIBUTING.md#conventional-pull-request-titles - run: echo "$PR_TITLE" | npx commitlint --help-url $HELP_URL - - - name: 🏷️ Manage label based on PR title check result - if: always() - run: .github/scripts/update-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.title-check.outcome }} "🔤 invalid title" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: echo "$PR_TITLE" | npx commitlint diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..6d333da --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,15 @@ +/** + * @type {import('@commitlint/types').UserConfig} + */ +const config = { + extends: ['@commitlint/config-conventional'], + rules: { + 'subject-case': [ + 0, + 'always', + ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], + ], + }, +}; + +module.exports = config;