Compare commits

..

1 Commits

Author SHA1 Message Date
Noah Zweben MacBook
465d83de0c Rename plugin from "ralph-wiggum" to "ralph-loop"
Update all internal references to use "Ralph Loop" as the prominent name
Keep explanatory text noting it "implements the Ralph Wiggum technique"
Rename plugin directory from plugins/ralph-wiggum to plugins/ralph-loop
Update marketplace.json with new plugin name and source path
Update plugin-dev documentation references
2026-01-06 15:55:24 -08:00

View File

@@ -4,34 +4,26 @@ on:
pull_request_target: pull_request_target:
types: [opened] types: [opened]
permissions:
pull-requests: write
issues: write
jobs: jobs:
check-membership: check-membership:
if: vars.DISABLE_EXTERNAL_PR_CHECK != 'true' if: vars.DISABLE_EXTERNAL_PR_CHECK != 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if author has write access - name: Check if author is org member
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:
script: | script: |
const org = 'anthropics';
const author = context.payload.pull_request.user.login; const author = context.payload.pull_request.user.login;
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({ try {
owner: context.repo.owner, await github.rest.orgs.checkMembershipForUser({
repo: context.repo.repo, org: org,
username: author username: author
}); });
console.log(`${author} is an org member, allowing PR`);
if (['admin', 'write'].includes(data.permission)) { } catch (e) {
console.log(`${author} has ${data.permission} access, allowing PR`); if (e.status === 404) {
return;
}
console.log(`${author} has ${data.permission} access, closing PR`);
await github.rest.issues.createComment({ await github.rest.issues.createComment({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
@@ -45,3 +37,7 @@ jobs:
pull_number: context.payload.pull_request.number, pull_number: context.payload.pull_request.number,
state: 'closed' state: 'closed'
}); });
console.log(`Closed PR from external contributor: ${author}`);
}
}