Skip to content

Commit

Permalink
Fix some GraphQL holes in release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Oct 6, 2024
1 parent b2dcec3 commit 5e86d0c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tools/Tgstation.Server.ReleaseNotes/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ async ValueTask DeleteMilestone(Milestone milestoneToDelete, int moveToMilestone
{
{ Component.Configuration, configVersion },
{ Component.RestApi, restVersion },
{ Component.GraphQLApi, graphQLVersion },
{ Component.DreamMakerApi, dmApiVersion },
{ Component.InteropApi, interopVersion },
{ Component.WebControlPanel, webControlVersion },
Expand Down Expand Up @@ -513,6 +514,7 @@ async ValueTask DeleteMilestone(Milestone milestoneToDelete, int moveToMilestone
static string GetComponentDisplayName(Component component, bool debian) => component switch
{
Component.RestApi => debian ? "the REST API" : "REST API",
Component.GraphQLApi => debian ? "the GraphQL API" : "GraphQL API",
Component.InteropApi => debian ? "the Interop API" : "Interop API",
Component.Configuration => debian ? "the TGS configuration" : "**Configuration**",
Component.DreamMakerApi => debian ? "the DreamMaker API" : "DreamMaker API",
Expand Down Expand Up @@ -1166,15 +1168,23 @@ static async Task<ReleaseNotes> GenerateNotes(IGitHubClient client, Dictionary<C
var nugetApiVersions = EnumerateNugetVersions("Tgstation.Server.Api");
var nugetClientVersions = EnumerateNugetVersions("Tgstation.Server.Client");

const string ApiTagPrefix = "api-v";
const string GraphQLTagPrefix = "graphql-v";
const string DMApiTagPrefix = "dmapi-v";
var newDic = new Dictionary<Component, IReadOnlySet<Version>> {
{ Component.RestApi, releases
.Where(x => x.TagName.StartsWith("api-v"))
.Select(x => Version.Parse(x.TagName[5..]))
.Where(x => x.TagName.StartsWith(ApiTagPrefix))
.Select(x => Version.Parse(x.TagName[ApiTagPrefix.Length..]))
.OrderBy(x => x)
.ToHashSet() },
{ Component.GraphQLApi, releases
.Where(x => x.TagName.StartsWith(GraphQLTagPrefix))
.Select(x => Version.Parse(x.TagName[GraphQLTagPrefix.Length..]))
.OrderBy(x => x)
.ToHashSet() },
{ Component.DreamMakerApi, releases
.Where(x => x.TagName.StartsWith("dmapi-v"))
.Select(x => Version.Parse(x.TagName[7..]))
.Where(x => x.TagName.StartsWith(DMApiTagPrefix))
.Select(x => Version.Parse(x.TagName[DMApiTagPrefix.Length..]))
.OrderBy(x => x)
.ToHashSet() },
{ Component.NugetCommon, await nugetCommonVersions },
Expand Down

0 comments on commit 5e86d0c

Please sign in to comment.