diff --git a/.github/workflows/auto-approve-dominions-prs.yml b/.github/workflows/auto-approve-dominions-prs.yml
index d2dd311018..b9fd7da731 100644
--- a/.github/workflows/auto-approve-dominions-prs.yml
+++ b/.github/workflows/auto-approve-dominions-prs.yml
@@ -4,8 +4,7 @@
name: "Auto-Approve Dominion's PRs"
on:
- pull_request:
- types: [opened, synchronize]
+ pull_request_target:
branches:
- dev
- master
diff --git a/.github/workflows/ci-suite.yml b/.github/workflows/ci-suite.yml
index 64bd71cbf6..bad7fe6e79 100644
--- a/.github/workflows/ci-suite.yml
+++ b/.github/workflows/ci-suite.yml
@@ -21,7 +21,7 @@ env:
TGS_TEST_DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
TGS_TEST_IRC_CHANNEL: ${{ secrets.IRC_CHANNEL }}
TGS_TEST_IRC_CONNECTION_STRING: ${{ secrets.IRC_CONNECTION_STRING }}
- TGS_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TGS_TEST_GITHUB_TOKEN: ${{ secrets.LIVE_TESTS_TOKEN }}
TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
concurrency:
@@ -32,7 +32,7 @@ jobs:
security-checkpoint:
name: Check CI Clearance
runs-on: ubuntu-latest
- if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
+ if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id && github.event.pull_request.state == 'open'
steps:
- name: Comment on new Fork PR
if: github.event.action == 'opened' && !contains(github.event.pull_request.labels.*.name, 'CI Cleared')
@@ -47,14 +47,14 @@ jobs:
labels: CI Cleared
- name: Fail Clearance Check if PR has Unlabeled new Commits from Fork
- if: (github.event.action == 'synchronize' || github.event.action == 'reopened') && !contains(github.event.pull_request.labels.*.name, 'CI Cleared')
+ if: (github.event.action == 'synchronize' || github.event.action == 'reopened') || ((github.event.action == 'opened' || github.event.action == 'labeled') && !contains(github.event.pull_request.labels.*.name, 'CI Cleared'))
run: exit 1
start-ci-run-gate:
name: Start CI Run Gate
needs: security-checkpoint
runs-on: ubuntu-latest
- if: always() && (needs.security-checkpoint.result == 'success' || (needs.security-checkpoint.result == 'skipped' && (github.event_name == 'push' || github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id)))
+ if: "!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (needs.security-checkpoint.result == 'skipped' && (github.event_name == 'push' || (github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event_name != 'pull_request_target'))))"
steps:
- name: GitHub Requires at Least One Step for a Job
run: exit 0
@@ -62,7 +62,7 @@ jobs:
analyze:
name: Code Scanning
needs: start-ci-run-gate
- if: always() && needs.start-ci-run-gate.result == 'success'
+ if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Install Node 12.X
@@ -100,7 +100,7 @@ jobs:
dmapi-build:
name: Build DMAPI
needs: start-ci-run-gate
- if: always() && needs.start-ci-run-gate.result == 'success'
+ if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1592
@@ -158,7 +158,7 @@ jobs:
name: Build Doxygen Site
runs-on: ubuntu-latest
needs: start-ci-run-gate
- if: always() && needs.start-ci-run-gate.result == 'success'
+ if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
steps:
- name: Checkout (Branch Push)
uses: actions/checkout@v3
@@ -208,7 +208,7 @@ jobs:
name: Build Docker Image
runs-on: ubuntu-latest
needs: start-ci-run-gate
- if: always() && needs.start-ci-run-gate.result == 'success'
+ if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
steps:
- name: Checkout (Branch Push)
uses: actions/checkout@v3
@@ -226,7 +226,7 @@ jobs:
linux-unit-tests:
name: Linux Tests
needs: start-ci-run-gate
- if: always() && needs.start-ci-run-gate.result == 'success'
+ if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
strategy:
fail-fast: false
matrix:
@@ -266,7 +266,7 @@ jobs:
windows-unit-tests:
name: Windows Tests
needs: start-ci-run-gate
- if: always() && needs.start-ci-run-gate.result == 'success'
+ if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
strategy:
fail-fast: false
matrix:
@@ -306,7 +306,7 @@ jobs:
windows-integration-test:
name: Windows Live Tests
needs: dmapi-build
- if: always() && needs.dmapi-build.result == 'success'
+ if: "!(cancelled() || failure()) && needs.dmapi-build.result == 'success'"
env:
TGS_TEST_DATABASE_TYPE: SqlServer
TGS_TEST_DUMP_API_SPEC: yes
@@ -386,7 +386,7 @@ jobs:
linux-integration-tests:
name: Linux Live Tests
needs: dmapi-build
- if: always() && needs.dmapi-build.result == 'success'
+ if: "!(cancelled() || failure()) && needs.dmapi-build.result == 'success'"
services: # We start all dbs here so we can just code the stuff once
postgres:
image: cyberboss/postgres-max-connections # Fork of _/postgres:latest with max_connections=500 becuase GitHub actions service containers have no way to set command lines. Rebuilds with updates.
@@ -538,7 +538,7 @@ jobs:
validate-openapi-spec:
name: OpenAPI Spec Validation
needs: windows-integration-test
- if: always() && needs.windows-integration-test.result == 'success'
+ if: "!(cancelled() || failure()) && needs.windows-integration-test.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Install Node 12.X
@@ -571,7 +571,7 @@ jobs:
upload-code-coverage:
name: Upload Code Coverage
needs: [linux-unit-tests, linux-integration-tests, windows-unit-tests, windows-integration-test]
- if: always() && needs.linux-unit-tests.result == 'success' && needs.linux-integration-tests.result == 'success' && needs.windows-unit-tests.result == 'success' && needs.windows-integration-test.result == 'success'
+ if: "!(cancelled() || failure()) && needs.linux-unit-tests.result == 'success' && needs.linux-integration-tests.result == 'success' && needs.windows-unit-tests.result == 'success' && needs.windows-integration-test.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Checkout (Branch Push)
@@ -661,7 +661,7 @@ jobs:
name: Deploy HTTP API
needs: [upload-code-coverage, validate-openapi-spec]
runs-on: windows-latest
- if: always() && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')
+ if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')"
steps:
- name: Checkout (Branch Push)
uses: actions/checkout@v3
@@ -690,7 +690,7 @@ jobs:
uses: juitnow/github-action-create-release@v1
id: create_release
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
tag_name: api-v${{ env.TGS_API_VERSION }}
release_name: tgstation-server API v${{ env.TGS_API_VERSION }}
@@ -700,7 +700,7 @@ jobs:
- name: Upload OpenApi Spec
uses: actions/upload-release-asset@v1
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./swagger/swagger.json
@@ -711,7 +711,7 @@ jobs:
name: Deploy DreamMaker API
needs: [upload-code-coverage, validate-openapi-spec]
runs-on: windows-latest
- if: always() && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')
+ if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')"
steps:
- name: Checkout (Branch Push)
uses: actions/checkout@v3
@@ -739,7 +739,7 @@ jobs:
uses: juitnow/github-action-create-release@v1
id: create_release
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
tag_name: dmapi-v${{ env.TGS_DM_VERSION }}
release_name: tgstation-server DMAPI v${{ env.TGS_DM_VERSION }}
@@ -749,7 +749,7 @@ jobs:
- name: Upload DMAPI Artifact
uses: actions/upload-release-asset@v1
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./DMAPI.zip
@@ -760,7 +760,7 @@ jobs:
name: Deploy Nuget Packages
needs: [upload-code-coverage, validate-openapi-spec]
runs-on: ubuntu-latest
- if: always() && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')
+ if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
@@ -797,7 +797,7 @@ jobs:
name: Ensure TGS Release is Latest GitHub Release
needs: [deploy-dm, deploy-http]
runs-on: ubuntu-latest
- if: always() && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')
+ if: "!(cancelled() || failure()) && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
@@ -821,7 +821,7 @@ jobs:
name: Deploy TGS
needs: [deploy-dm, deploy-http, upload-code-coverage, validate-openapi-spec]
runs-on: windows-latest
- if: always() && (needs.upload-code-coverage.result == 'success' || needs.validate-openapi-spec.result == 'success') && github.event_name == 'push' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')
+ if: "!(cancelled() || failure()) && (needs.upload-code-coverage.result == 'success' || needs.validate-openapi-spec.result == 'success') && github.event_name == 'push' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
@@ -944,7 +944,7 @@ jobs:
deploy-docker:
name: Deploy TGS (Docker)
needs: [deploy-tgs]
- if: always() && needs.deploy-tgs.result == 'success'
+ if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Checkout (Branch Push)
diff --git a/build/Version.props b/build/Version.props
index 86d0b1a547..2f853ecd6c 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -7,7 +7,7 @@
4.6.0
9.10.2
10.4.1
- 11.4.1
+ 11.4.2
6.4.2
5.6.0
1.2.2
diff --git a/src/Tgstation.Server.Client/ApiClient.cs b/src/Tgstation.Server.Client/ApiClient.cs
index e48727de1d..649745b609 100644
--- a/src/Tgstation.Server.Client/ApiClient.cs
+++ b/src/Tgstation.Server.Client/ApiClient.cs
@@ -25,7 +25,7 @@ using Tgstation.Server.Common;
namespace Tgstation.Server.Client
{
///
- sealed class ApiClient : IApiClient
+ class ApiClient : IApiClient
{
///
/// PATCH .
@@ -248,7 +248,9 @@ namespace Tgstation.Server.Client
using (memoryStream)
{
+#pragma warning disable CA2000 // Dispose objects before losing scope
var streamContent = new StreamContent(uploadStream ?? memoryStream);
+#pragma warning restore CA2000 // Dispose objects before losing scope
try
{
await RunRequest