File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 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."
You can’t perform that action at this time.
0 commit comments