Skip to content

Commit 5e46379

Browse files
iBugsehyeon1104
authored andcommittedJan 9, 2023
Improve PR close auto-comment message (mmistakes#3713)
* Improve auto-comment message * Lock these PRs after closing
1 parent 3d311b5 commit 5e46379

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed
 

‎.github/PULL_REQUEST_TEMPLATE.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,5 @@
2626
-->
2727

2828
<!--
29-
Please delete this comment if you confirm that you want to submit this Pull Request.
30-
CHECK_PR_DID_NOT_CONFIRM
29+
Please confirm that you want to submit this Pull Request to Minimal Mistakes, the free Jekyll theme by Michael Rose, by deleting this comment block.
3130
-->

‎.github/workflows/bad-pr.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ on:
77
jobs:
88
close-pr:
99
runs-on: ubuntu-latest
10-
if: "contains(github.event.pull_request.body, 'CHECK_PR_DID_NOT_CONFIRM') || github.event.pull_request.body == ''"
10+
if: "contains(github.event.pull_request.body, 'by deleting this comment block') || github.event.pull_request.body == ''"
1111
steps:
1212
- uses: actions-ecosystem/action-add-labels@v1
1313
with:
1414
labels: 'Type: Invalid'
1515
- uses: superbrothers/close-pull-request@v3
1616
with:
1717
# Optional. Post an issue comment just before closing a pull request.
18-
comment: "This PR is not valid for inclusion. Please check again if you're submitting improvements for *the theme*."
18+
comment: |
19+
**You have created a Pull Request to the wrong repository.** This is the repository for [Minimal Mistakes][1], the free Jekyll theme. See [GitHub Docs: About pull requests][2] if you need help.
20+
21+
[1]: https://mmistakes.github.io/minimal-mistakes/
22+
[2]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
23+
- uses: sudo-bot/action-pull-request-lock@v1.0.5
24+
with:
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
number: ${{ github.event.pull_request.number }}
27+
lock-reason: spam

0 commit comments

Comments
 (0)
Please sign in to comment.