Skip to content

Commit

Permalink
Cleanup trigger_all_tests github workflow (#4088)
Browse files Browse the repository at this point in the history
### Description
Small cleanup from comments in #4084
  • Loading branch information
tonidero authored Jul 22, 2024
1 parent fb7ea42 commit f597880
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/trigger_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ jobs:
env:
READ_ORG_GITHUB_TOKEN: ${{ secrets.READ_ORG_GITHUB_TOKEN }}
id: verify
# ensure that only RevenueCat members can trigger this
# ensure that only RevenueCat members can trigger this. According to Github docs, only 204
# response codes correspond to members of the organization.
run: |
RESPONSE=$(curl -s -o /dev/null --head -w "%{http_code}" -H "Authorization: Bearer $READ_ORG_GITHUB_TOKEN" https://api.github.com/orgs/RevenueCat/members/${{ github.event.comment.user.login }})
RESPONSE=$(curl -s -o /dev/null \
--head \
-w "%{http_code}" \
-H "Authorization: Bearer $READ_ORG_GITHUB_TOKEN" \
https://api.github.com/orgs/RevenueCat/members/${{ github.event.comment.user.login }})
if [[ "$RESPONSE" != "204" ]]; then
echo "User is not a member of the organization"
exit 1
Expand Down

0 comments on commit f597880

Please sign in to comment.