node/tools/actions/start-ci.sh
Antoine du Hamel 3fe35dc5af
Revert "tools: add --certify-safe to nci-ci"
This reverts commit 0fa07d4442.

PR-URL: https://github.com/nodejs/node/pull/53098
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-05-24 09:47:50 +00:00

30 lines
707 B
Bash
Executable File

#!/bin/sh
set -xe
REQUEST_CI_LABEL="request-ci"
REQUEST_CI_FAILED_LABEL="request-ci-failed"
for pr in "$@"; do
gh pr edit "$pr" --remove-label "$REQUEST_CI_LABEL"
ci_started=yes
rm -f output;
ncu-ci run "$pr" >output 2>&1 || ci_started=no
cat output
if [ "$ci_started" = "no" ]; then
# Do we need to reset?
gh pr edit "$pr" --add-label "$REQUEST_CI_FAILED_LABEL"
# shellcheck disable=SC2154
cqurl="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
body="<details><summary>Failed to start CI</summary><pre>$(cat output)</pre><a href='$cqurl'>$cqurl</a></details>"
echo "$body"
gh pr comment "$pr" --body "$body"
rm output
fi
done;