Skip to content

Commit 14fc5e0

Browse files
Merge branch 'develop-2.0.0' into fix/duplicate-scene-added-to-scenes-in-build-list
2 parents 6967621 + ece63de commit 14fc5e0

File tree

242 files changed

+9917
-4260
lines changed

Some content is hidden

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

242 files changed

+9917
-4260
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
# Order is important; the last matching pattern takes the most precedence.
33

44
* @Unity-Technologies/multiplayer-sdk
5-
Profiling/ @Unity-Technologies/multiplayer-tools
6-
Metrics/ @Unity-Technologies/multiplayer-tools
7-
/com.unity.netcode.gameobjects/Runtime/Transports/ @Unity-Technologies/multiplayer-workflows
8-
/com.unity.netcode.gameobjects/Tests/Editor/Transports/ @Unity-Technologies/multiplayer-workflows
9-
/com.unity.netcode.gameobjects/Tests/Runtime/Transports/ @Unity-Technologies/multiplayer-workflows
10-
*.asmdef @chrispope @miniwolf
11-
package.json @chrispope @miniwolf
12-
AssemblyInfo.cs @chrispope @miniwolf
13-
.editorconfig @chrispope @miniwolf
14-
.gitignore @chrispope @miniwolf
15-
.github/ @chrispope @miniwolf
16-
.yamato/ @chrispope @miniwolf
5+
*.asmdef @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
6+
package.json @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
7+
AssemblyInfo.cs @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
8+
.editorconfig @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
9+
.gitignore @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
10+
.github/ @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
11+
.yamato/ @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa

.github/ISSUE_TEMPLATE/support.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ assignees: ''
77

88
---
99

10-
Post your questions or problems here.
10+
For support related questions we HIGHLY recommend to post a message either on the [Unity Discussions](https://discussions.unity.com/tag/netcode-for-gameobjects) or on our [Discord Community](https://discord.gg/TqNeJTtC) where you can get help from the community and the developers.
11+
Those forums will get you the fastest response and are the best place to ask for help.
1112

12-
For general questions, networking advice or discussions about the Netcode for GameObjects, you can also reach us on our [Discord Community](https://discord.gg/FM8SE9E) or create a post in the [Unity Multiplayer Forum](https://forum.unity.com/forums/multiplayer.26/).
13+
If you still feel like you want to open a support issue as an GitHub Issue, please make sure to include as much information as possible (also including any relevant code/project) to help us understand your problem.

.github/pull_request_template.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
<!-- Add short version of the JIRA ticket to the PR title (e.g. "feat: new shiny feature [MTT-123]") -->
44

5-
<!-- Add RFC link here if applicable. -->
6-
75
## Changelog
86

97
- Added: The package whose Changelog should be added to should be in the header. Delete the changelog section entirely if it's not needed.
@@ -26,3 +24,13 @@
2624
- [ ] Deprecation of the API is explained in the CHANGELOG.
2725
- [ ] The users can understand why this API was removed and what they should use instead.
2826
-->
27+
28+
## Backport
29+
30+
<!-- If this is a backport:
31+
- Add the following to the PR title: "\[Backport\] ..." .
32+
- Link to the original PR.
33+
If this needs a backport - state this here
34+
If a backport is not needed please provide the reason why.
35+
If the "Backports" section is not present it will lead to a CI test failure.
36+
-->

.github/renovate.json5

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"baseBranches": ["develop", "develop-2.0.0"],
3+
"dependencyDashboard": true,
4+
5+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
6+
"extends": [
7+
"local>Unity-Technologies/unity-renovate-config"
8+
],
9+
"prConcurrentLimit": 100,
10+
// Ignore commits produced by GitHub actions workflows
11+
"gitIgnoredAuthors": ["githubaction@githubaction.com"],
12+
"ignorePaths": [
13+
"**/node_modules/**",
14+
// Don't renovate files in special folders using ~ as suffix
15+
"**/*~/**",
16+
"com.unity.netcode.gameobjects/**/*",
17+
"Examples/**/*",
18+
"testproject/**/*",
19+
"minimalproject/**/*",
20+
"testproject-tools-integration/**/*"
21+
],
22+
"packageRules": [
23+
// Run unity-upm-project and unity-upm-package only on weekends to reduce PR noise
24+
// Also ensure dependencies won't be downgraded when they don't exist in the public repositories
25+
{
26+
"matchManagers": [
27+
"unity-upm-project",
28+
"unity-upm-package"
29+
],
30+
"enabled": "true",
31+
"schedule": [
32+
"every weekend"
33+
],
34+
"rollbackPrs": false,
35+
}
36+
],
37+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This workflow manages issue assignments and related label changes:
2+
# 1. When someone is assigned to an issue:
3+
# - Removes "stat:awaiting-triage" label
4+
# - Adds "stat:Investigating" label
5+
# 2. When all assignees are removed from an issue:
6+
# - Adds "stat:awaiting-triage" label
7+
# - Removes "stat:Investigating" label
8+
# 3. When "stat:Investigating" label is added:
9+
# - Automatically assigns the issue to the person who added the label
10+
11+
name: Handle Issue Assignment and Labels
12+
13+
on:
14+
issues:
15+
types: [assigned, unassigned, labeled]
16+
17+
env:
18+
AWAITING-TRIAGE_LABEL: stat:awaiting-triage
19+
INVESTIGATING_LABEL: stat:Investigating
20+
21+
jobs:
22+
handle_assignment:
23+
name: Handle Issue Assignment Changes
24+
if: ${{ !github.event.issue.pull_request && github.event.issue.state == 'open' }}
25+
runs-on: ubuntu-latest
26+
permissions:
27+
issues: write
28+
29+
steps:
30+
- name: Handle Assignment Changes
31+
run: |
32+
if [[ "${{ github.event.action }}" == "assigned" ]]; then
33+
# Someone was assigned - remove awaiting-triage, add investigating
34+
echo "ADD=${{ env.INVESTIGATING_LABEL }}" >> $GITHUB_ENV
35+
echo "REMOVE=${{ env.AWAITING-TRIAGE_LABEL }}" >> $GITHUB_ENV
36+
elif [[ "${{ github.event.action }}" == "unassigned" ]]; then
37+
# Check if there are any remaining assignees
38+
ASSIGNEES=$(echo '${{ toJson(github.event.issue.assignees) }}' | jq length)
39+
if [[ "$ASSIGNEES" == "0" ]]; then
40+
# No assignees left - add awaiting-triage, remove investigating
41+
echo "ADD=${{ env.AWAITING-TRIAGE_LABEL }}" >> $GITHUB_ENV
42+
echo "REMOVE=${{ env.INVESTIGATING_LABEL }}" >> $GITHUB_ENV
43+
fi
44+
fi
45+
46+
- name: Update Labels
47+
if: env.ADD != '' || env.REMOVE != ''
48+
run: gh issue edit "$NUMBER" --add-label "$ADD" --remove-label "$REMOVE"
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
GH_REPO: ${{ github.repository }}
52+
NUMBER: ${{ github.event.issue.number }}
53+
54+
handle_investigating_label:
55+
name: Handle Investigating Label Addition
56+
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'stat:Investigating' && !github.event.issue.pull_request && github.event.issue.state == 'open' }}
57+
runs-on: ubuntu-latest
58+
permissions:
59+
issues: write
60+
61+
steps:
62+
- name: Assign Issue to person that added Investigating Label
63+
run: |
64+
# Assign the issue to the person who added the label
65+
gh issue edit "$NUMBER" --add-assignee "$ACTOR"
66+
env:
67+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
GH_REPO: ${{ github.repository }}
69+
NUMBER: ${{ github.event.issue.number }}
70+
ACTOR: ${{ github.actor }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow is designed to verify that the pull request description contains a "## Backport" section, which is important as a reminder to account for backports for anyone that works with NGO repository.
2+
# We have 2 development branches (develop and develop-2.0.0) and we need to ensure that relevant changes are landing in only one or both of them
3+
# If the "##Backport" section is missing, the workflow will fail and block the PR from merging, prompting the developer to add this section.
4+
5+
# The workflow is configured to run when PR is created as well as when it is edited which also counts simple description edits.
6+
7+
name: "NGO - Backport Verification"
8+
9+
on:
10+
pull_request:
11+
types: [opened, edited, synchronize, reopened]
12+
branches:
13+
- develop
14+
- develop-2.0.0
15+
16+
jobs:
17+
backport-verification:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Check PR description
24+
uses: actions/github-script@v6
25+
with:
26+
script: |
27+
const pr = context.payload.pull_request;
28+
const body = pr.body || '';
29+
30+
if (!body.includes('## Backport')) {
31+
core.setFailed('PR description must include a "## Backport" section. Please add this section and provide information about this PR backport to develop or develop-2.0.0 branch respectively or explain why backport is not needed.');
32+
}

.github/workflows/conventional-pr.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
name: Conventional PR
22

3-
# Controls when the action will run.
3+
# Controls when the action will run.
44
on:
55
pull_request:
66
branches:
77
- develop
88
- develop-2.0.0
9-
109
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1110
jobs:
1211
# This workflow contains a single job called "build"
@@ -18,7 +17,7 @@ jobs:
1817
steps:
1918
- name: semantic-pull-request
2019
# Internal Unity mirror available at jesseo/action-semantic-pull-request, but actions from private repos aren't supported, so continue to use the public one below
21-
uses: amannn/action-semantic-pull-request@b7a9a97cb10fa6e1ae02647e718798175f6b1f1d
20+
uses: amannn/action-semantic-pull-request@v5
2221
env:
2322
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2423
with:
@@ -35,4 +34,4 @@ jobs:
3534
# For work-in-progress PRs you can typically use draft pull requests from Github. However, private repositories on the free plan don't have this option and therefore this action allows you to opt-in to using the special '[WIP]' prefix to indicate this state. This will avoid the validation of the PR title and the pull request checks remain pending. Note that a second check will be reported if this is enabled.
3635
#wip: # optional
3736
# When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit, and it's easy to commit this by mistake. Enable this option to also validate the commit message for one commit PRs.
38-
validateSingleCommit: true # optional
37+
# validateSingleCommit: true # optional
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This workflow will update issues with proper "conversation related" labels. This mean that stat:awaiting-repsonse label will be present after Unity account made comments and stat:reply-needed will be present when user made latest comment
2+
3+
name: Update conversation labels of the issue
4+
5+
# Trigger for the workflow
6+
# This trigger will populate the github.event object
7+
# Details on properties are here: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=created#issue_comment
8+
on:
9+
issue_comment:
10+
types: [created]
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.issue.number }}
14+
cancel-in-progress: true
15+
16+
# Define labels here
17+
env:
18+
AWAITING_RESPONSE: stat:awaiting-response
19+
REPLY_NEEDED: stat:reply-needed
20+
21+
jobs:
22+
conversation_labels:
23+
name: Calculate and update conversation labels of the issue
24+
if: ${{ !github.event.issue.pull_request && github.event.issue.state == 'open' }}
25+
runs-on: ubuntu-latest
26+
permissions:
27+
issues: write
28+
29+
steps:
30+
- name: Calculate labels
31+
run: |
32+
33+
if [[ "${{ github.event.comment.author_association }}" == "MEMBER" ]]; then
34+
# Unity member commented - add awaiting-response, remove reply-needed
35+
echo "ADD=${{ env.AWAITING_RESPONSE }}" >> $GITHUB_ENV
36+
echo "REMOVE=${{ env.REPLY_NEEDED }}" >> $GITHUB_ENV
37+
else
38+
# Non-Unity member commented - add reply-needed, remove awaiting-response
39+
echo "ADD=${{ env.REPLY_NEEDED }}" >> $GITHUB_ENV
40+
echo "REMOVE=${{ env.AWAITING_RESPONSE }}" >> $GITHUB_ENV
41+
fi
42+
43+
- name: Update labels
44+
# This runs a command using the github cli: https://cli.github.com/manual/gh_issue_edit
45+
# If $ADD is set, it will add the label, otherwise it will remove the label
46+
# There is no need to check if $ADD or $REMOVE is set, as the command will ignore it if it is empty
47+
run: gh issue edit "$NUMBER" --add-label "$ADD" --remove-label "$REMOVE"
48+
env:
49+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
GH_REPO: ${{ github.repository }}
51+
NUMBER: ${{ github.event.issue.number }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow utilises an existing implementation (https://github.com/actions/stale) that performs the following actions:
2+
# 1) Adds "stale" label to issues that have "stat:awaiting-response" for more than 30 days meaning that since we don't have enough information we may potentially close such issue
3+
# 2) Closes issues that have been marked as "stale" for more than 30 days
4+
5+
# This affects only Issues but at some point we may also consider rules for PRs
6+
7+
name: Mark or Close Stale Issues
8+
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: '0 0 * * *' # Runs daily at midnight
13+
14+
jobs:
15+
stale:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
issues: write
19+
20+
steps:
21+
- uses: actions/stale@v9
22+
with:
23+
# Only mark issues (not PRs) as stale
24+
any-of-labels: 'stat:awaiting-response'
25+
days-before-stale: 30
26+
days-before-close: 30
27+
stale-issue-label: 'Stale'
28+
exempt-issue-labels: 'stat:import,stat:imported'
29+
stale-issue-message: >
30+
This issue has been automatically marked as stale because it has been awaiting
31+
response for over 30 days without any activity.
32+
33+
Please update the issue with any new information or it may be closed in 30 days.
34+
close-issue-message: >
35+
This issue has been automatically closed because it has been stale for 30 days
36+
without any activity. Feel free to reopen if you have new information to add.
37+
# Prevent the action from marking/closing PRs
38+
days-before-pr-stale: -1
39+
days-before-pr-close: -1
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflow will remove almost all labels from closed issues beside ones that could be relevant for future tracking like: "port:", "type:", "priority:", "regression" and "stat:imported"
2+
3+
name: Remove labels when issue is closed
4+
5+
on:
6+
issues:
7+
types: [closed] # We want it to run on closed issues
8+
9+
jobs:
10+
remove_labels:
11+
name: Calculate and remove issue labels
12+
if: ${{ !github.event.issue.pull_request }} # This is needed to distinguish from PRs (which we don't want to affect)
13+
runs-on: ubuntu-latest
14+
permissions:
15+
issues: write
16+
17+
steps:
18+
- name: Find labels to remove
19+
id: data
20+
run: |
21+
# Convert labels to array and filter out type: labels
22+
LABELS_TO_REMOVE=($(echo "$EXISTING_LABELS" | jq -r '.[] | select(startswith("type:") or startswith("port:") or startswith("priority:") or . == "regression" or . == "stat:imported" | not)'))
23+
24+
# Only proceed if we have labels to remove
25+
if [ ${#LABELS_TO_REMOVE[@]} -gt 0 ]; then
26+
echo "REMOVE_LABELS=$(IFS=,; echo "${LABELS_TO_REMOVE[*]}")" >> $GITHUB_ENV
27+
echo "HAS_LABELS=true" >> $GITHUB_ENV
28+
else
29+
echo "HAS_LABELS=false" >> $GITHUB_ENV
30+
fi
31+
env:
32+
EXISTING_LABELS: ${{ toJson(github.event.issue.labels.*.name) }}
33+
34+
- name: Remove labels
35+
if: ${{ env.REMOVE_LABELS != '' }}
36+
run: gh issue edit "$NUMBER" --remove-label "$REMOVE_LABELS"
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
GH_REPO: ${{ github.repository }}
40+
NUMBER: ${{ github.event.issue.number }}

0 commit comments

Comments
 (0)