Update README.md #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Close Pull Requests | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened] | |
| jobs: | |
| close-pr: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Close PR and comment | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: 'Thank you for your interest! However, this repository is exclusively used as a central hub for issue tracking and bug reports. We do not accept pull requests here. Therefore, this pull request is being automatically closed.' | |
| }); | |
| await github.rest.pulls.update({ | |
| pull_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'closed' | |
| }); |