Files
node/.github/workflows/commit-lint.yml
T
Rich Trott bfc07ef6a5 build: update to setup-node@v2
commit-lint.yml uses setup-node@v1 but all our other GitHub Actions use
v2. Update commit-lint.yml.

PR-URL: https://github.com/nodejs/node/pull/39366
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-14 12:23:29 -07:00

21 lines
763 B
YAML

name: "Commit messages adheres to guidelines at https://goo.gl/p2fr5Q"
on: [pull_request]
jobs:
lint-commit-message:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Last 100 commits should be enough for a PR
fetch-depth: 100
- name: Use Node.js 12
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: Validate commit messages
run: |
echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json"
git log --oneline ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | grep -v -e fixup -e squash | awk '{ print $1 }' | xargs npx -q core-validate-commit --no-validate-metadata --tap