# As squash merging is enforced in this repository, we enforce conventional commits # in the PR title, which is used as the commit message on merge, to ensure that the # commit messages that make it into the main branch follow a standard format. # This step is done in a separate workflow file so that we can trigger on the `edited` pull_request event type. name: PR Title Lint on: pull_request: types: - edited - opened - reopened - synchronize permissions: contents: read jobs: pr-title-lint: runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v4.4.0 with: persist-credentials: false show-progress: false sparse-checkout: | commitlint.config.ts packages/*/package.json sparse-checkout-cone-mode: false - name: Lint Pull Request Title env: PR_TITLE: ${{ github.event.pull_request.title }} run: | npm init --scope=clerk --yes npm i --save-dev @commitlint/config-conventional @commitlint/cli --audit=false --fund=false echo "$PR_TITLE" | npm exec @commitlint/cli -- --config commitlint.config.ts