name: PR Lint on: pull_request: # By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened. We # explicity override here so that PR titles are re-linted when the PR text content is edited. # # Possible values: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request types: [opened, edited, reopened, synchronize] # cancel previous workflow jobs for PRs concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} cancel-in-progress: true jobs: lint-check: runs-on: ubuntu-24.04 permissions: contents: read pull-requests: write steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false submodules: recursive - uses: ./.github/actions/pr-lint-action with: title-regex: "^(build|chore|ci|docs|feat|fix|perf|refactor|style|test|other)(\\(.+\\))?(\\!)?:\\s.+" on-failed-regex-fail-action: true on-failed-regex-request-changes: false on-failed-regex-create-review: false on-failed-regex-comment: "Please format your PR title to match: `%regex%`!" repo-token: "${{ github.token }}"