2023-08-29 10:00:14 +02:00
|
|
|
name: PR Title Lint
|
2023-04-25 16:22:15 +02:00
|
|
|
on: # yamllint disable-line rule:truthy
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
|
|
|
- edited
|
|
|
|
merge_group:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
types:
|
|
|
|
- checks_requested
|
2023-06-09 17:12:20 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-04-25 16:22:15 +02:00
|
|
|
jobs:
|
|
|
|
commit-checks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 14:23:27 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-25 16:22:15 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Install conventional-commit linter
|
|
|
|
run: npm install @commitlint/config-conventional @commitlint/cli
|
|
|
|
|
2023-06-09 17:12:20 +02:00
|
|
|
- name: Run commitlint on PR title
|
2023-08-29 10:00:14 +02:00
|
|
|
env:
|
|
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
|
|
# Echo from env variable to avoid bash errors with extra characters
|
|
|
|
run: echo "$PR_TITLE" | npx commitlint --verbose
|