File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -102,10 +102,13 @@ jobs:
102102 run : |
103103 # Re-use scratch orgs to prevent exceeding new scratch orgs/day limits:
104104 set -euo pipefail
105- QUERY="SELECT LoginUrl FROM ScratchOrgInfo WHERE SignupUsername LIKE '*$SCRATCH_ORG_DOMAIN'"
105+ QUERY="SELECT LoginUrl, SignupUsername FROM ScratchOrgInfo WHERE SignupUsername LIKE '*$SCRATCH_ORG_DOMAIN' AND Status = 'Active'"
106+ echo "$QUERY"
106107 RESPONSE=$(sf data query --target-org "$DEV_HUB" -q "$QUERY" --json 2>/dev/null || true)
108+ echo "$RESPONSE"
107109 LOGIN_URL=$(echo "$RESPONSE" | jq -r '.result.records[0]?.LoginUrl // empty')
108- echo "Existing Scratch Org: $LOGIN_URL"
110+ USERNAME=$(echo "$RESPONSE" | jq -r '.result.records[0]?.SignupUsername // empty')
111+ echo "Existing Scratch Org: $USERNAME"
109112 if [[ -n "$LOGIN_URL" && "$LOGIN_URL" != "null" ]]; then
110113 sf org login jwt \
111114 --client-id "$CLIENT_ID" \
You can’t perform that action at this time.
0 commit comments