Skip to content

Commit b3f0ed2

Browse files
Merge remote-tracking branch 'upstream/minor-next' into feat/anvil
2 parents 5b9dc2c + b10caf7 commit b3f0ed2

File tree

254 files changed

+7494
-3430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+7494
-3430
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @pmmp/server-developers

.github/ISSUE_TEMPLATE/api-change-request.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ assignees: ''
77

88
---
99

10-
<!--- tell us what you want -->
11-
## Description
10+
<!--- Describe the problem you want to solve -->
11+
## Problem description
1212

1313

14-
<!--- explain why you want this and why it's a good idea -->
15-
## Justification
14+
<!--- Describe what changes you want to make to solve this problem -->
15+
## Proposed solution
1616

1717

1818
<!--- (optional) describe alternative methods you've explored to achieve your goal -->
19-
## Alternative methods
19+
## Alternative solutions that don't require API changes

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ contact_links:
33
- name: Help & support on Discord
44
url: https://discord.gg/bmSAZBG
55
about: We don't accept support requests on the issue tracker. Please try asking on Discord instead.
6-
- name: Help & support on forums
7-
url: https://forums.pmmp.io
8-
about: We don't accept support requests on the issue tracker. Please try asking on forums instead.
96
- name: Documentation
107
url: https://pmmp.rtfd.io
118
about: PocketMine-MP documentation

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,32 @@
1-
## Introduction
1+
<!-- Summarize your PR here. Keep it short and simple. -->
22
<!-- Explain existing problems or why this pull request is necessary -->
33

4-
### Relevant issues
5-
<!-- List relevant issues here -->
4+
### Related issues & PRs
65
<!--
7-
86
* Fixes #1
9-
* Fixes #2
10-
7+
* Related to #2
118
-->
129

1310
## Changes
1411
### API changes
1512
<!-- Any additions to the API that should be documented in release notes? -->
13+
<!-- If not, you can delete this section -->
1614

1715
### Behavioural changes
1816
<!-- Any change in how the server behaves, or its performance? -->
17+
<!-- If not, you can delete this section -->
1918

2019
## Backwards compatibility
2120
<!-- Any possible backwards incompatible changes? How are they solved, or how can they be solved? -->
21+
<!-- If not, you can delete this section -->
2222

2323
## Follow-up
2424
<!-- Suggest any actions to be done before/after merging this pull request -->
25-
<!--
26-
27-
Requires translations:
28-
29-
| Name | Value in eng.ini |
30-
| :--: | :---: |
31-
| `foo.bar` | `Foo bar` |
32-
33-
-->
25+
<!-- For example, future changes that this PR lays the groundwork for -->
3426

3527
## Tests
3628
<!--
37-
PRs which have not been tested MUST be marked as draft.
29+
If this PR affects gameplay or user experience in some way, it must be manually tested.
30+
Include any screenshots or videos of manual testing here.
31+
Any test plugin code should also be pasted here if it can't be adapted to a PHPUnit test.
3832
-->
39-
I tested this PR by doing the following (tick all that apply):
40-
- [ ] Writing PHPUnit tests (commit these in the `tests/phpunit` folder)
41-
- [ ] Playtesting using a Minecraft client (provide screenshots or a video)
42-
- [ ] Writing a test plugin (provide the code and sample output)
43-
- [ ] Other (provide details)

.github/dependabot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@ updates:
3737
- package-ecosystem: github-actions
3838
directory: "/"
3939
schedule:
40-
interval: weekly
40+
interval: monthly
41+
groups:
42+
github-actions:
43+
patterns: ["*"]

.github/workflows/build-docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT
5454

5555
- name: Build image for tag
56-
uses: docker/build-push-action@v6.6.1
56+
uses: docker/build-push-action@v6.10.0
5757
with:
5858
push: true
5959
context: ./pocketmine-mp
@@ -66,7 +66,7 @@ jobs:
6666
6767
- name: Build image for major tag
6868
if: steps.channel.outputs.CHANNEL == 'stable'
69-
uses: docker/build-push-action@v6.6.1
69+
uses: docker/build-push-action@v6.10.0
7070
with:
7171
push: true
7272
context: ./pocketmine-mp
@@ -79,7 +79,7 @@ jobs:
7979
8080
- name: Build image for minor tag
8181
if: steps.channel.outputs.CHANNEL == 'stable'
82-
uses: docker/build-push-action@v6.6.1
82+
uses: docker/build-push-action@v6.10.0
8383
with:
8484
push: true
8585
context: ./pocketmine-mp
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Build image for latest tag
9494
if: steps.channel.outputs.CHANNEL == 'stable'
95-
uses: docker/build-push-action@v6.6.1
95+
uses: docker/build-push-action@v6.10.0
9696
with:
9797
push: true
9898
context: ./pocketmine-mp
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Release PR checks
2+
3+
on:
4+
#do checks on every PR update
5+
pull_request:
6+
branches:
7+
- stable
8+
- minor-next
9+
- major-next
10+
- "legacy/*"
11+
paths:
12+
- "src/VersionInfo.php"
13+
14+
#allow this workflow to be invoked on PR merge, prior to creating the release
15+
workflow_call:
16+
outputs:
17+
valid:
18+
description: Whether this commit is valid for release
19+
value: ${{ jobs.check-intent.outputs.valid && jobs.check-validity.result == 'success' }}
20+
21+
permissions:
22+
contents: read #for user access check
23+
24+
jobs:
25+
check-intent:
26+
name: Check release trigger
27+
runs-on: ubuntu-20.04
28+
29+
outputs:
30+
valid: ${{ steps.validate.outputs.DEV_BUILD == 'false' }}
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Check IS_DEVELOPMENT_BUILD flag
36+
id: validate
37+
run: |
38+
echo DEV_BUILD=$(sed -n "s/^\s*public const IS_DEVELOPMENT_BUILD = \(true\|false\);$/\1/p" src/VersionInfo.php) >> $GITHUB_OUTPUT
39+
40+
check-validity:
41+
name: Validate release info
42+
needs: [check-intent]
43+
#don't do these checks if this isn't a release - we don't want to generate unnecessary failed statuses
44+
if: needs.check-intent.outputs.valid == 'true'
45+
46+
runs-on: ubuntu-20.04
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Setup PHP
52+
uses: shivammathur/[email protected]
53+
with:
54+
php-version: 8.2
55+
56+
- name: Restore Composer package cache
57+
uses: actions/cache@v4
58+
with:
59+
path: |
60+
~/.cache/composer/files
61+
~/.cache/composer/vcs
62+
key: "composer-v2-cache-${{ hashFiles('./composer.lock') }}"
63+
restore-keys: |
64+
composer-v2-cache-
65+
66+
- name: Install Composer dependencies
67+
run: composer install --no-dev --prefer-dist --no-interaction --ignore-platform-reqs
68+
69+
- name: Check author permissions
70+
id: check-permission
71+
uses: actions-cool/check-user-permission@v2
72+
with:
73+
token: ${{ secrets.GITHUB_TOKEN }}
74+
require: write
75+
username: ${{ github.event.pull_request.user.login }}
76+
#technically this would be fine for dependabot but generally bots don't count as team members
77+
check-bot: true
78+
79+
- name: Abort if user permissions are insufficient
80+
#user doesn't have permission or is a bot
81+
if: steps.check-permission.outputs.require-result != 'true' || steps.check-permission.outputs.check-result != 'false'
82+
run: |
83+
echo "::error::This user is not authorized to trigger releases"
84+
exit 1
85+
86+
- name: Check changelog file is present
87+
id: file-presence
88+
run: |
89+
CHANGELOG_FILE="changelogs/$(php build/dump-version-info.php changelog_file_name)"
90+
if [ ! -f "${{ github.workspace }}/$CHANGELOG_FILE" ]; then
91+
echo "::error::$CHANGELOG_FILE does not exist"
92+
exit 1
93+
fi
94+
echo FILE="$CHANGELOG_FILE" >> $GITHUB_OUTPUT
95+
96+
- name: Check header is present in changelog file
97+
run: |
98+
FILE="${{ steps.file-presence.outputs.FILE }}"
99+
VERSION="$(php build/dump-version-info.php base_version)"
100+
if ! grep -Fqx "# $VERSION" "${{ github.workspace }}/$FILE"; then
101+
echo "::error::Header for $VERSION not found in $FILE"
102+
exit 1
103+
fi
104+
105+
- name: Check version is valid for the selected channel
106+
run: |
107+
CHANNEL="$(php build/dump-version-info.php channel)"
108+
if [ "$(php build/dump-version-info.php suffix_valid)" != "true" ]; then
109+
echo "::error::Version $(php build/dump-version-info.php base_version) is not allowed on the $CHANNEL channel"
110+
exit 1
111+
fi

0 commit comments

Comments
 (0)