forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
21 lines (19 loc) · 820 Bytes
/
commit-lint.yml
File metadata and controls
21 lines (19 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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:
ref: ${{ github.event.pull_request.head.sha }}
# Last 100 commits should be enough for a PR
fetch-depth: 100
- name: Use Node.js 12
uses: actions/setup-node@v1
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