From c9e12b0880f0e844adc96bb56f950264603705fe Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Tue, 5 Sep 2023 10:59:40 +0300 Subject: [PATCH] fix: better handling of PR creation exceptions --- entrypoint.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index aa88024..d6385df 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -127,6 +127,13 @@ create_pull_request() { PULL_REQUESTS_NUMBER=$(echo "${PULL_RESPONSE}" | jq '.number') view_debug_output + if [ "$PULL_REQUESTS_URL" = null ]; then + echo "FAILED TO CREATE PULL REQUEST" + echo "RESPONSE: ${PULL_RESPONSE}" + + exit 1 + fi + if [ -n "$INPUT_PULL_REQUEST_LABELS" ]; then PULL_REQUEST_LABELS=$(echo "[\"${INPUT_PULL_REQUEST_LABELS}\"]" | sed 's/, \|,/","/g')