Skip to content

fix(ci): test on npm@12 #82

fix(ci): test on npm@12

fix(ci): test on npm@12 #82

Workflow file for this run

name: Lint Commits
on:
pull_request:
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
lint-pr-first-commit:
name: Commit Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22.x
- run: npm install --global npm@12
- run: npm install
- name: Lint first PR commit message
run: |
FIRST=$(git rev-list --reverse ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | head -1)
echo "Base: ${{ github.event.pull_request.base.sha }}"
echo "Head: ${{ github.event.pull_request.head.sha }}"
echo "First PR commit: $FIRST"
git log -1 --format=%B "$FIRST" | npx commitlint --verbose