Files
wehub-resource-sync bde7ea0d58
CI / ci (push) Waiting to run
Deploy Docs / Deploy Docs (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 12:39:56 +08:00

37 lines
974 B
YAML

name: Check PR Title
on:
pull_request:
types: [opened, edited]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint-pr-title:
name: Lint PR title
runs-on: ubuntu-slim
if: ${{ (github.event.action == 'opened' || github.event.changes.title != null) && github.actor != 'renovate[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
# Only fetch the config file from the repository
sparse-checkout-cone-mode: false
sparse-checkout: commitlint.config.ts
- name: Install dependencies
run: npm install -D @commitlint/cli @commitlint/config-conventional
- name: Validate PR title with commitlint
run: echo "$PR_TITLE" | npx commitlint
env:
PR_TITLE: ${{ github.event.pull_request.title }}