Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/scripts/checkMembership.mjs

This file was deleted.

20 changes: 7 additions & 13 deletions .github/workflows/contributor_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ jobs:
name: Contributor Membership Check
runs-on: spacetimedb-runner
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: |
npm install @octokit/rest @actions/core @actions/github node-fetch

- name: Verify author is contributor
run: node .github/scripts/checkMembership.mjs
env:
GITHUB_TOKEN: ${{ secrets.ORG_READ_TOKEN }}
CONTRIB_ORG: clockworklabs
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
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