tools: fix skip PR if CI is still running

resolve: https://github.com/nodejs/node/issues/40330

PR-URL: https://github.com/nodejs/node/pull/42377
Fixes: https://github.com/nodejs/node/issues/40330
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
Xuguang Mei
2022-03-21 12:33:11 +08:00
committed by GitHub
parent 419f02ba1f
commit 8f07452206

View File

@@ -40,7 +40,7 @@ for pr in "$@"; do
fi
# Skip PR if CI is still running
if ncu-ci url "https://github.com/${OWNER}/${REPOSITORY}/pull/${pr}" 2>&1 | grep "^Result *PENDING"; then
if gh pr checks "$pr" | grep -q "\spending\s"; then
echo "pr ${pr} skipped, CI still running"
continue
fi