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

Automatically close invalid PRs using GitHub Actions #3313

Merged
merged 3 commits into from
Jan 10, 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
7 changes: 6 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@

<!--
Is this related to any GitHub issue(s)?
-->
-->

<!--
Please delete this comment if you confirm that you want to submit this Pull Request.
CHECK_PR_DID_NOT_CONFIRM
-->
18 changes: 18 additions & 0 deletions .github/workflows/bad-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Cleanup bad PR

on:
pull_request_target:
types: [opened, reopened]

jobs:
close-pr:
runs-on: ubuntu-latest
if: "contains(github.event.pull_request.body, 'CHECK_PR_DID_NOT_CONFIRM') || 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*."