Skip to content

Commit 47f47b5

Browse files
committed
Skid from paper
1 parent fc4983e commit 47f47b5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Thanks paper: https://github.com/papermc/paper/blob/master/.github/workflows/close_invalid_prs.yml
2+
name: Close invalid PRs
3+
4+
on:
5+
pull_request_target:
6+
types: [ opened ]
7+
8+
jobs:
9+
run:
10+
name: Close invalid PRs
11+
if: |
12+
github.repository != github.event.pull_request.head.repo.full_name &&
13+
(
14+
github.head_ref == 'master' ||
15+
github.event.pull_request.head.repo.owner.type != 'User'
16+
)
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: superbrothers/close-pull-request@v3
20+
id: "master_branch"
21+
if: github.head_ref == 'master'
22+
with:
23+
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
24+
25+
- uses: superbrothers/close-pull-request@v3
26+
id: "org_account"
27+
if: github.event.pull_request.head.repo.owner.type != 'User' && steps.master_branch.outcome == 'skipped'
28+
with:
29+
comment: "Please do not open pull requests from non-user accounts like organisations. Create a fork on a user account instead."

0 commit comments

Comments
 (0)