mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Rather than hard-coding GitHub Actions to use Node.js 14.x, use the `lts/*` shorthand for "most recent LTS version". PR-URL: https://github.com/nodejs/node/pull/39538 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
24 lines
811 B
YAML
24 lines
811 B
YAML
name: "Commit messages adheres to guidelines at https://goo.gl/p2fr5Q"
|
|
|
|
on: [pull_request]
|
|
|
|
env:
|
|
NODE_VERSION: lts/*
|
|
|
|
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: Install Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
- 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
|