diff --git a/.github/workflows/close-pull-requests.yml b/.github/workflows/close-pull-requests.yml new file mode 100644 index 00000000000..5ef42b152fa --- /dev/null +++ b/.github/workflows/close-pull-requests.yml @@ -0,0 +1,30 @@ +name: 'Close Pull Requests' + +on: + pull_request_target: + types: opened + workflow_dispatch: + +jobs: + close: + # Avoid forks to run this job + if: github.repository_owner == 'moodlehq' + name: Close Pull Requests + runs-on: ubuntu-latest + steps: + - uses: dessant/repo-lockdown@v4 + with: + process-only: prs + close-pr: true + pr-comment: > + **Please, don't open pull requests via GitHub.** + + + This repository (moodle.git) at GitHub is just a mirror of the official Moodle repository. + + + For how to contribute patches for Moodle see + [CONTRIBUTING.txt](https://github.com/moodle/moodle/blob/main/CONTRIBUTING.txt). + + + Closing this pull request.