diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8911527d3d..8cc6d8687c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,8 +66,9 @@ jobs: if: github.event_name == 'pull_request' run: | echo "Looking up: ${{ github.event.pull_request.user.login }}" + ENCODED_USERNAME=$(printf '%s' '${{ github.event.pull_request.user.login }}' | jq -sRr @uri) - LOOKUP_USER=$(curl --write-out "%{http_code}" --silent --output /dev/null --location 'https://api.github.com/orgs/tryghost/members/${{ github.event.pull_request.user.login }}' --header 'Authorization: Bearer ${{ secrets.CANARY_DOCKER_BUILD }}') + LOOKUP_USER=$(curl --write-out "%{http_code}" --silent --output /dev/null --location "https://api.github.com/orgs/tryghost/members/$ENCODED_USERNAME" --header "Authorization: Bearer ${{ secrets.CANARY_DOCKER_BUILD }}") if [ "$LOOKUP_USER" == "204" ]; then echo "User is in the org"