diff --git a/.github/workflows/deploy-test-environment.yml b/.github/workflows/deploy-test-environment.yml index 66b15beb91..2e4aaf5ff2 100644 --- a/.github/workflows/deploy-test-environment.yml +++ b/.github/workflows/deploy-test-environment.yml @@ -37,15 +37,12 @@ jobs: ORG_ID: ${{ github.repository_owner_id }} COMMENT_AUTHOR: ${{ github.event.comment.user.login }} run: | - MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \ - -o /dev/null -w '%{http_code}\n' -s) - if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then - echo "is-allowed-user=true" > $GITHUB_OUTPUT + ALLOWED_USERS="60435625" + COMMENT_AUTHOR="${{ github.event.comment.user.id }}" + if [[ ",$ALLOWED_USERS," == *",$COMMENT_AUTHOR,"* ]]; then + echo "is-allowed-user=true" >> $GITHUB_OUTPUT else - echo "is-allowed-user=false" > $GITHUB_OUTPUT + echo "is-allowed-user=false" >> $GITHUB_OUTPUT fi - name: Get PR ref