set pr_url outside if (#7424)

This commit is contained in:
Alvin Huang 2020-03-10 12:31:58 -04:00 committed by GitHub
parent 3b4306fc42
commit 0dd8c44291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,8 +82,8 @@ fi
# the labels from the PR # the labels from the PR
labels=$(echo "$resp" | jq --raw-output '.items[].labels[] | .name') labels=$(echo "$resp" | jq --raw-output '.items[].labels[] | .name')
ret="$?" ret="$?"
pr_url=$(echo "$resp" | jq --raw-output '.items[].pull_request.html_url')
if [[ "$ret" -ne 0 ]]; then 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)?" 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 # 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. # cherry-picking is possible. Exit 0 for now unless we run into cases where these failures are important.