ci: auto-close pull requests — not accepting PRs, use Discord

This commit is contained in:
Sam Sung
2026-08-02 06:07:18 +07:00
parent 914b4d6b69
commit 0827173781
+21
View File
@@ -0,0 +1,21 @@
# GitHub has no switch to disable pull requests, so this closes them on arrival.
# Uses pull_request_target (base-repo context, no PR code checked out) so it can
# comment and close on PRs from forks.
name: close-prs
on:
pull_request_target:
types: [opened, reopened]
permissions:
pull-requests: write
jobs:
close:
runs-on: ubuntu-latest
steps:
- run: |
gh pr comment "$PR" --repo "$REPO" --body \
"Thanks for the interest! benilla is a solo project and isn't taking pull requests for now — please bring bug reports and ideas to the Discord instead: https://discord.gg/wJSJx467G4"
gh pr close "$PR" --repo "$REPO"
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}