Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve PR close auto-comment message #3713

Merged
merged 2 commits into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@
-->

<!--
Please delete this comment if you confirm that you want to submit this Pull Request.
CHECK_PR_DID_NOT_CONFIRM
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.
-->
13 changes: 11 additions & 2 deletions .github/workflows/bad-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ on:
jobs:
close-pr:
runs-on: ubuntu-latest
if: "contains(github.event.pull_request.body, 'CHECK_PR_DID_NOT_CONFIRM') || github.event.pull_request.body == ''"
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: 'Type: Invalid'
- uses: superbrothers/close-pull-request@v3
with:
# Optional. Post an issue comment just before closing a pull request.
comment: "This PR is not valid for inclusion. Please check again if you're submitting improvements for *the theme*."
comment: |
**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.

[1]: https://mmistakes.github.io/minimal-mistakes/
[2]: 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/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
lock-reason: spam