Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! tools: don't use GH API for commit message checks
  • Loading branch information
Trott committed Dec 1, 2018
commit 722a07b2042334ea858347fe6addf248733a4c29
4 changes: 2 additions & 2 deletions tools/lint-pr-commit-message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ fi

PATCH=$( curl -sL https://github.com/nodejs/node/pull/${PR_ID}.patch | grep '^From \|^Subject: ' )
Comment thread
Trott marked this conversation as resolved.
Resolved
if FIRST_COMMIT="$( echo "$PATCH" | awk '/^From [0-9a-f]{40} / { if (count++ == 0) print $2 }' )"; then
MESSAGE=$( echo "$PATCH" | awk '/^Subject: \[PATCH 1/ { gsub(/^Subject: \[PATCH[^\]]*\] /, ""); print }' )
MESSAGE=$( git show --quiet --format='format:%B' $FIRST_COMMIT )
echo "
*** Linting the first commit message for pull request ${PR_ID}
*** according to the guidelines at https://goo.gl/p2fr5Q.
*** Commit message for $(echo $FIRST_COMMIT | cut -c 1-10) is:
${MESSAGE}
${MESSAGE}
"
npx -q core-validate-commit --no-validate-metadata "${FIRST_COMMIT}"
fi