mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
The commit linter was checking out the PR HEAD commit instead of merge/rebase commit, causing it to fail for any PRs that were not rebased on our default branch. Removing `ref` should fix the issue. PR-URL: https://github.com/nodejs/node/pull/39121 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
21 lines
763 B
YAML
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@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
|