-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.36 KB
/
Copy pathbad-pr.yml
File metadata and controls
34 lines (30 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Cleanup bad PR
on:
pull_request_target:
types: [opened, reopened]
permissions:
contents: read
jobs:
close-pr:
permissions:
pull-requests: write
runs-on: ubuntu-latest
if: "contains(github.event.pull_request.body, 'by deleting this comment block') || github.event.pull_request.body == ''"
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: |
invalidpr
- uses: superbrothers/close-pull-request@v3
with:
# Post a comment just before closing a pull request
comment: |
It looks like you are attempting to push a change to the [Academic Pages][1] template repository, for help with deploying your own website please [start a new thread in the discussions][2] or see the [GitHub Docs: About pull requests][3] if you need help.
[1]: https://github.com/academicpages/academicpages.github.io
[2]: https://github.com/academicpages/academicpages.github.io/discussions
[3]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
- uses: sudo-bot/action-pull-request-lock@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
lock-reason: spam