Auto merge of #23402 - servo:jdm-patch-46, r=Manishearth

Improve output for local WPT sync runs.

This avoids warnings about unset values when running the script locally.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23402)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-05-16 04:48:05 -04:00 committed by GitHub
commit ce93e017c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,12 +91,12 @@ function unsafe_open_pull_request() {
# is unnecessary.
git checkout "${BRANCH_NAME}" || return 0
if [[ -z "${WPT_SYNC_TOKEN+set}" ]]; then
if [[ -z "${WPT_SYNC_TOKEN+set}" && "${TASKCLUSTER_PROXY_URL+set}" == "set" ]]; then
SECRET_RESPONSE=$(curl ${TASKCLUSTER_PROXY_URL}/secrets/v1/secret/project/servo/wpt-sync)
WPT_SYNC_TOKEN=`echo "${SECRET_RESPONSE}" | jq --raw-output '.secret.token'`
fi
if [[ -z "${WPT_SYNC_TOKEN}" ]]; then
if [[ -z "${WPT_SYNC_TOKEN+set}" ]]; then
echo "Github auth token missing from WPT_SYNC_TOKEN."
return 1
fi