mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-20 06:32:04 -04:00
25 lines
764 B
YAML
25 lines
764 B
YAML
name: Contributor Membership Check
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
merge_group:
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
check_membership:
|
|
name: Contributor Membership Check
|
|
runs-on: spacetimedb-runner
|
|
steps:
|
|
- name: Verify author is contributor
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ORG_READ_TOKEN }}
|
|
CONTRIB_ORG: clockworklabs
|
|
PR_AUTHOR: ${{ github.event.pull_request.user.login || (github.event_name == 'merge_group' && github.event.sender.login) || null }}
|
|
run: |
|
|
if [[ $(gh api --paginate /orgs/$CONTRIB_ORG/members --jq 'any(.login == env.PR_AUTHOR)') != true ]]; then
|
|
echo "::error::$PR_AUTHOR is not a member of the organization"
|
|
exit 1
|
|
fi
|
|
|