Skip to content

Commit 5267b85

Browse files
committed
Simplify contributor check
1 parent f3a5dc2 commit 5267b85

File tree

2 files changed

+7
-53
lines changed

2 files changed

+7
-53
lines changed

.github/scripts/checkMembership.mjs

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/contributor_check.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,14 @@ jobs:
1010
name: Contributor Membership Check
1111
runs-on: spacetimedb-runner
1212
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
15-
16-
- name: Set up Node.js
17-
uses: actions/setup-node@v2
18-
with:
19-
node-version: '16'
20-
21-
- name: Install dependencies
22-
run: |
23-
npm install @octokit/rest @actions/core @actions/github node-fetch
24-
2513
- name: Verify author is contributor
26-
run: node .github/scripts/checkMembership.mjs
2714
env:
2815
GITHUB_TOKEN: ${{ secrets.ORG_READ_TOKEN }}
16+
CONTRIB_ORG: clockworklabs
17+
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
18+
run: |
19+
if [[ $(gh api --paginate /orgs/$CONTRIB_ORG/members --jq 'any(.login == env.PR_AUTHOR)') != true ]]; then
20+
echo "::error::$PR_AUTHOR is not a member of the organization"
21+
exit 1
22+
fi
2923

0 commit comments

Comments
 (0)