Skip to content

Commit 280ce66

Browse files
committed
tidy up close external pr's workflow
1 parent bc71257 commit 280ce66

1 file changed

Lines changed: 1 addition & 28 deletions

File tree

.github/workflows/auto-close-external-prs.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,4 @@ jobs:
2828
repo: context.repo.repo,
2929
pull_number: pr,
3030
state: "closed"
31-
});
32-
33-
sweep-existing:
34-
if: github.event_name == 'workflow_dispatch'
35-
runs-on: ubuntu-latest
36-
permissions:
37-
pull-requests: write
38-
issues: write
39-
steps:
40-
- uses: actions/github-script@v7
41-
with:
42-
script: |
43-
const owner = context.repo.owner;
44-
const repo = context.repo.repo;
45-
const prs = await github.paginate(github.rest.pulls.list, {
46-
owner, repo, state: 'open', per_page: 100
47-
});
48-
for (const pr of prs) {
49-
if (pr.user.login === owner) continue;
50-
core.info(`Closing PR #${pr.number} by ${pr.user.login}`);
51-
await github.rest.issues.createComment({
52-
owner, repo, issue_number: pr.number,
53-
body: "Thanks for the interest! This repository isn't currently accepting external contributions as I am actively experimenting with different approaches and want to avoid merge conflicts. Therefore, this PR is being closed automatically by Github Bot."
54-
});
55-
await github.rest.pulls.update({
56-
owner, repo, pull_number: pr.number, state: "closed"
57-
});
58-
}
31+
});

0 commit comments

Comments
 (0)