Skip to content

Commit ea2fdbf

Browse files
committed
contd.
1 parent 090f08e commit ea2fdbf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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" \

0 commit comments

Comments
 (0)