diff --git a/src/Tgstation.Server.Api/Models/Request/UserCreateRequest.cs b/src/Tgstation.Server.Api/Models/Request/UserCreateRequest.cs
index 715a056386..74f37ef7d2 100644
--- a/src/Tgstation.Server.Api/Models/Request/UserCreateRequest.cs
+++ b/src/Tgstation.Server.Api/Models/Request/UserCreateRequest.cs
@@ -3,6 +3,7 @@ namespace Tgstation.Server.Api.Models
///
/// For creating a user.
///
+ #pragma warning disable CA1501
public sealed class UserCreateRequest : UserUpdateRequest
{
}
diff --git a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs
index a1dcb0b409..1817808d27 100644
--- a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs
+++ b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs
@@ -371,21 +371,23 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
}
}
- ///
- public override async Task> SendUpdateMessage(
+ ///
+ /// Create a of s for a discord update embed.
+ ///
+ /// The of the deployment.
+ /// The BYOND of the deployment.
+ /// The repository GitHub owner, if any.
+ /// The repository GitHub name, if any.
+ /// if the local deployment commit was pushed to the remote repository.
+ /// A new of s to use.
+ static List BuildUpdateEmbedFields(
Models.RevisionInformation revisionInformation,
Version byondVersion,
- DateTimeOffset? estimatedCompletionTime,
string gitHubOwner,
string gitHubRepo,
- ulong channelId,
- bool localCommitPushed,
- CancellationToken cancellationToken)
+ bool localCommitPushed)
{
bool gitHub = gitHubOwner != null && gitHubRepo != null;
-
- localCommitPushed |= revisionInformation.CommitSha == revisionInformation.OriginCommitSha;
-
var fields = new List
{
new EmbedFieldBuilder
@@ -420,6 +422,23 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
Value = $"[{x.TitleAtMerge}]({x.Url}) by _[@{x.Author}](https://github.com/{x.Author})_{Environment.NewLine}Commit: [{x.TargetCommitSha.Substring(0, 7)}](https://github.com/{gitHubOwner}/{gitHubRepo}/commit/{x.TargetCommitSha}){(String.IsNullOrWhiteSpace(x.Comment) ? String.Empty : $"{Environment.NewLine}_**{x.Comment}**_")}"
}));
+ return fields;
+ }
+
+ ///
+ public override async Task> SendUpdateMessage(
+ Models.RevisionInformation revisionInformation,
+ Version byondVersion,
+ DateTimeOffset? estimatedCompletionTime,
+ string gitHubOwner,
+ string gitHubRepo,
+ ulong channelId,
+ bool localCommitPushed,
+ CancellationToken cancellationToken)
+ {
+ localCommitPushed |= revisionInformation.CommitSha == revisionInformation.OriginCommitSha;
+
+ var fields = BuildUpdateEmbedFields(revisionInformation, byondVersion, gitHubOwner, gitHubRepo, localCommitPushed);
var builder = new EmbedBuilder
{
Author = new EmbedAuthorBuilder
diff --git a/src/Tgstation.Server.Host/Core/SwaggerConfiguration.cs b/src/Tgstation.Server.Host/Core/SwaggerConfiguration.cs
index 2f2c9518cc..888be2a716 100644
--- a/src/Tgstation.Server.Host/Core/SwaggerConfiguration.cs
+++ b/src/Tgstation.Server.Host/Core/SwaggerConfiguration.cs
@@ -422,7 +422,7 @@ namespace Tgstation.Server.Host.Core
var rootSchemaId = GenerateSchemaId(context.Type);
var rootRequestSchema = rootSchemaId.EndsWith("Request", StringComparison.Ordinal);
var rootResponseSchema = rootSchemaId.EndsWith("Response", StringComparison.Ordinal);
- var isPutRequest = rootRequestSchema && rootSchemaId.EndsWith("CreateRequest", StringComparison.Ordinal);
+ var isPutRequest = rootSchemaId.EndsWith("CreateRequest", StringComparison.Ordinal);
Tuple> GetTypeFromKvp(Type currentType, KeyValuePair kvp, IDictionary schemaDictionary)
{