From 369a6c0f89fbdcb6766e8715c4c18100ded6c6ac Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 3 Dec 2023 23:54:12 -0500 Subject: [PATCH 1/2] Allow emoji :cl: tags See https://github.com/tgstation/tgstation/pull/80115 --- .github/PULL_REQUEST_TEMPLATE.md | 14 +++++++------- tools/Tgstation.Server.ReleaseNotes/Program.cs | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c146ed90dab..a71922c1dfb 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,21 +2,21 @@ [Release Notes]: # (Your PR should contain a detailed list of notable changes, titled appropriately. This includes any observable changes to the server or DMAPI. See examples below.) -:cl: +🆑 Description of your change. Each newline corresponds to a release note in the release your change is included in. -/:cl: +/🆑 -:cl: +🆑 You can also have multiple sets of release notes per pull request. They will be amalgamated together in the end. -/:cl: +/🆑 -:cl: Categories +🆑 Categories Categories are used by [the release notes tool](../tools/Tgstation.Server.ReleaseNotes) to generate formatted changelists used in releases. The default category is Core. -Only one category may be specified for a :cl: block. +Only one category may be specified for a 🆑 block. Valid categories are Core, DreamMaker API, HTTP API, Host Watchdog, Web Control Panel, Configuration, Nuget: Api, Nuget: Client, and Nuget: Common. -/:cl: +/🆑 [Why]: # (If this does not close or work on an existing GitHub issue, please add a short description [two lines down] of why you think these changes would benefit the server. If you can't justify it in words, it might not be worth adding.) diff --git a/tools/Tgstation.Server.ReleaseNotes/Program.cs b/tools/Tgstation.Server.ReleaseNotes/Program.cs index 6aba269c2fb..cbcd5487d87 100644 --- a/tools/Tgstation.Server.ReleaseNotes/Program.cs +++ b/tools/Tgstation.Server.ReleaseNotes/Program.cs @@ -682,7 +682,7 @@ async Task CommitNotes(Component component, List notes) var trimmedLine = line.Trim(); if (targetComponent == null) { - if (trimmedLine.StartsWith(":cl:", StringComparison.Ordinal)) + if (trimmedLine.StartsWith(":cl:", StringComparison.Ordinal) || trimmedLine.StartsWith("🆑", StringComparison.Ordinal)) { targetComponent = trimmedLine[4..].Trim(); if (targetComponent.Length == 0) @@ -690,7 +690,7 @@ async Task CommitNotes(Component component, List notes) } continue; } - if (trimmedLine.StartsWith("/:cl:", StringComparison.Ordinal)) + if (trimmedLine.StartsWith("/:cl:", StringComparison.Ordinal) || trimmedLine.StartsWith("/🆑", StringComparison.Ordinal)) { if(!Enum.TryParse(targetComponent, out var component)) component = targetComponent.ToUpperInvariant() switch From c23c4fa7f7a6bd9bf036a9c7cc0e453279da2a5d Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 3 Dec 2023 23:58:49 -0500 Subject: [PATCH 2/2] Clean up `BridgeController` CodeQL issue --- src/Tgstation.Server.Host/Controllers/BridgeController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tgstation.Server.Host/Controllers/BridgeController.cs b/src/Tgstation.Server.Host/Controllers/BridgeController.cs index 4ae2e0497c8..787bb33f869 100644 --- a/src/Tgstation.Server.Host/Controllers/BridgeController.cs +++ b/src/Tgstation.Server.Host/Controllers/BridgeController.cs @@ -88,10 +88,10 @@ public async ValueTask Process([FromQuery] string data, Cancellat using (LogContext.PushProperty(SerilogContextHelper.BridgeRequestIterationContextProperty, Interlocked.Increment(ref requestsProcessed))) { - BridgeParameters request; + var request = new BridgeParameters(); try { - request = JsonConvert.DeserializeObject(data, DMApiConstants.SerializerSettings); + JsonConvert.PopulateObject(data, request, DMApiConstants.SerializerSettings); } catch (Exception ex) {