0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/.github/workflows/commitlint.yml
renovate[bot] f7961248e9
chore(deps): update actions/checkout action to v3 (#619)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-22 09:13:21 +00:00

27 lines
679 B
YAML

name: Commitlint
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node and pnpm
uses: logto-io/actions-node-pnpm-run-steps@v1.1.0
with:
run-install: false
- name: Install commitlint
run: pnpm add -g @commitlint/{cli,config-conventional}
- name: Commitlint
run: commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
- name: Commitlint on PR title
run: echo '${{ github.event.pull_request.title }}' | commitlint