From 0dd8c44291d19f0fdc9a5d2fac9f3eb0691fe113 Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Tue, 10 Mar 2020 12:31:58 -0400 Subject: [PATCH] set pr_url outside if (#7424) --- .circleci/scripts/cherry-picker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/scripts/cherry-picker.sh b/.circleci/scripts/cherry-picker.sh index af765f243a..819a8a5427 100755 --- a/.circleci/scripts/cherry-picker.sh +++ b/.circleci/scripts/cherry-picker.sh @@ -82,8 +82,8 @@ fi # the labels from the PR labels=$(echo "$resp" | jq --raw-output '.items[].labels[] | .name') ret="$?" +pr_url=$(echo "$resp" | jq --raw-output '.items[].pull_request.html_url') if [[ "$ret" -ne 0 ]]; then - pr_url=$(echo "$resp" | jq --raw-output '.items[].pull_request.html_url') status "jq exited with $ret when trying to find label names. Are there labels applied to the PR ($pr_url)?" # This can be a valid error but usually this means we do not have any labels so it doesn't signal # cherry-picking is possible. Exit 0 for now unless we run into cases where these failures are important.