Skip to content

Commit

Permalink
fix: auto run smoke tests for members
Browse files Browse the repository at this point in the history
The default GitHub workflow token isn't privileged enough to check org
membership for PR authors. This prevents smoke tests for running
automatically for org members. To fix this, switch to a PAT with the correct
privileges for this check.

Signed-off-by: Nick Hale <[email protected]>
  • Loading branch information
njhale committed Jun 21, 2024
1 parent 8a283fd commit a92428e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
AUTHOR="${{ github.event.pull_request.user.login }}"
# Check for org membership
MEMBERSHIP_RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
MEMBERSHIP_RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.SMOKE_GH_TOKEN }}" \
"https://api.github.com/orgs/$ORG/members/$AUTHOR")
if [ "$MEMBERSHIP_RESPONSE_CODE" -eq 204 ]; then
Expand Down

0 comments on commit a92428e

Please sign in to comment.