mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
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:
parent
b917e3f280
commit
f0e93a508d
1 changed files with 11 additions and 26 deletions
37
.github/workflows/gate.yml
vendored
37
.github/workflows/gate.yml
vendored
|
|
@ -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.',
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue