ci(gate): stop auto-closing issues from non-collaborators (#3359)

Drops the `issues: opened` trigger and the issue-closing branch from
the gate workflow. PRs from non-collaborators are still auto-closed
(scripted contributions are higher-risk than feedback). Issues stay
open — agents already gate replies on collaborator status, so external
issues simply sit untouched instead of being auto-closed with a stock
message.
This commit is contained in:
Ahmed Abushagur 2026-04-24 23:26:47 -07:00 committed by GitHub
parent b917e3f280
commit f0e93a508d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,6 @@
name: Gate
on:
issues:
types: [opened]
pull_request_target:
types: [opened]
@ -57,28 +55,15 @@ jobs:
return;
}
console.log(`${sender} is NOT a member or collaborator, closing.`);
console.log(`${sender} is NOT a member or collaborator, closing PR.`);
if (context.payload.issue) {
await github.rest.issues.update({
...context.repo,
issue_number: context.payload.issue.number,
state: 'closed',
});
await github.rest.issues.createComment({
...context.repo,
issue_number: context.payload.issue.number,
body: 'This repository only accepts issues from organization members and collaborators. Your issue has been closed automatically.',
});
} else if (context.payload.pull_request) {
await github.rest.pulls.update({
...context.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
await github.rest.issues.createComment({
...context.repo,
issue_number: context.payload.pull_request.number,
body: 'This repository only accepts pull requests from organization members and collaborators. Your PR has been closed automatically.',
});
}
await github.rest.pulls.update({
...context.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
await github.rest.issues.createComment({
...context.repo,
issue_number: context.payload.pull_request.number,
body: 'This repository only accepts pull requests from organization members and collaborators. Your PR has been closed automatically.',
});