forked from mmistakes/minimal-mistakes
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically close invalid PRs using GitHub Actions (mmistakes#3313)
* Try auto-closing bad PRs * Include empty PR body as well * Add "Type: Invalid" label as well
- Loading branch information
1 parent
f667e7e
commit e81f548
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
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*." |