diff --git a/src/Tgstation.Server.Host/Components/Chat/Commands/PullRequestsCommand.cs b/src/Tgstation.Server.Host/Components/Chat/Commands/PullRequestsCommand.cs index 4655c9c29c..fab5b12b35 100644 --- a/src/Tgstation.Server.Host/Components/Chat/Commands/PullRequestsCommand.cs +++ b/src/Tgstation.Server.Host/Components/Chat/Commands/PullRequestsCommand.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Tgstation.Server.Api.Models; -using Tgstation.Server.Api.Models.Internal; using Tgstation.Server.Host.Components.Interop; using Tgstation.Server.Host.Components.Repository; using Tgstation.Server.Host.Components.Watchdog; @@ -70,7 +69,6 @@ namespace Tgstation.Server.Host.Components.Chat.Commands public async Task Invoke(string arguments, ChatUser user, CancellationToken cancellationToken) { IEnumerable results = null; - IGitRemoteInformation remoteInformation = null; if (arguments.Split(' ').Any(x => x.ToUpperInvariant() == "--REPO")) { string head; @@ -83,7 +81,6 @@ namespace Tgstation.Server.Host.Components.Chat.Commands }; head = repo.Head; - remoteInformation = repo; } await databaseContextFactory.UseContext( @@ -110,8 +107,6 @@ namespace Tgstation.Server.Host.Components.Chat.Commands results = watchdog.ActiveCompileJob?.RevisionInformation.ActiveTestMerges.Select(x => x.TestMerge).ToList() ?? new List(); } - string remoteDomain = remoteInformation.RemoteGitProvider == RemoteGitProvider.GitHub ? "github" : "gitlab"; - return new MessageContent { Text = !results.Any() @@ -120,21 +115,6 @@ namespace Tgstation.Server.Host.Components.Chat.Commands ", ", results.Select( x => $"#{x.Number} at {x.TargetCommitSha[..7]}")), - Embed = results.Any() && remoteInformation.RemoteGitProvider != RemoteGitProvider.Unknown - ? new ChatEmbed - { - Title = "Test Merges", - Colour = "#3FB950", - Description = "Live Test Merges", - Fields = results.Select( - testMerge => new ChatEmbedField - { - Name = $"#{testMerge.Number}", - Value = $"[{testMerge.TitleAtMerge}]({testMerge.Url}) by _[@{testMerge.Author}](https://{remoteDomain}.com/{testMerge.Author})_{Environment.NewLine}Commit: [{testMerge.TargetCommitSha.Substring(0, 7)}](https://{remoteDomain}.com/{remoteInformation.RemoteRepositoryOwner}/{remoteInformation.RemoteRepositoryName}/commit/{testMerge.TargetCommitSha}){(String.IsNullOrWhiteSpace(testMerge.Comment) ? String.Empty : $"{Environment.NewLine}_**{testMerge.Comment}**_")}", - }) - .ToList(), - } - : null, }; } #pragma warning restore CA1506