From b392871fe6a4ddb30a6bacaec55d79a0d64923ba Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Thu, 9 Jan 2025 08:39:02 +0000 Subject: [PATCH 1/2] (maint) Make GitReleaseManager.Cli default project As answered here: https://stackoverflow.com/a/6792308/671491 The first project in the sln file is the one that is set as the default startup project when opened in Visual Studio. This prevents the need to manually set this once the solution is opened. --- src/GitReleaseManager.sln | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GitReleaseManager.sln b/src/GitReleaseManager.sln index a92435e5..5ae09c23 100644 --- a/src/GitReleaseManager.sln +++ b/src/GitReleaseManager.sln @@ -2,10 +2,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.6.33801.468 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitReleaseManager.Tests", "GitReleaseManager.Tests\GitReleaseManager.Tests.csproj", "{FAD045A3-CF63-48CA-BA49-8F4D79E3EF4F}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitReleaseManager.Cli", "GitReleaseManager.Cli\GitReleaseManager.Cli.csproj", "{F1163F09-3D4E-4F95-AF46-24C15AB297FB}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitReleaseManager.Tests", "GitReleaseManager.Tests\GitReleaseManager.Tests.csproj", "{FAD045A3-CF63-48CA-BA49-8F4D79E3EF4F}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitReleaseManager.Core", "GitReleaseManager.Core\GitReleaseManager.Core.csproj", "{B02A026E-CA3A-48F4-BBA9-EB337B0A2035}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C87778A7-B100-4D05-A050-BA37BD59058C}" From a1458d3ce72a16f3c631215916242fc60793ae1e Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Thu, 9 Jan 2025 08:42:06 +0000 Subject: [PATCH 2/2] (#633) Update to latest NGitLab package version This addresses an issue which was seen when trying to close milestones using the GitLab provider. There would be an error thrown regarding being able to correctly serialize a number into an int32, since the number was too big. An upstream change was needed in NGitLab, so switch to usign to a long. There was a similar error when using GitHub, and a bump in the version of Octokit being used was required. This has been tested against a GitLab repository, and the close command which was previously failing is now working. --- src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj | 1 + .../GitReleaseManager.Core.Tests.csproj | 1 + src/GitReleaseManager.Core/GitReleaseManager.Core.csproj | 2 +- src/GitReleaseManager.Core/Model/Milestone.cs | 2 +- src/GitReleaseManager.Core/Provider/GitLabProvider.cs | 4 ++-- .../GitReleaseManager.IntegrationTests.csproj | 1 + src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj | 1 + src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj | 2 +- 8 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj b/src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj index 43f1f73b..cd9ebe5b 100644 --- a/src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj +++ b/src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj @@ -23,6 +23,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/src/GitReleaseManager.Core.Tests/GitReleaseManager.Core.Tests.csproj b/src/GitReleaseManager.Core.Tests/GitReleaseManager.Core.Tests.csproj index c12da586..7808c163 100644 --- a/src/GitReleaseManager.Core.Tests/GitReleaseManager.Core.Tests.csproj +++ b/src/GitReleaseManager.Core.Tests/GitReleaseManager.Core.Tests.csproj @@ -23,6 +23,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/src/GitReleaseManager.Core/GitReleaseManager.Core.csproj b/src/GitReleaseManager.Core/GitReleaseManager.Core.csproj index bca953b3..ec0f6e45 100644 --- a/src/GitReleaseManager.Core/GitReleaseManager.Core.csproj +++ b/src/GitReleaseManager.Core/GitReleaseManager.Core.csproj @@ -23,7 +23,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/src/GitReleaseManager.Core/Model/Milestone.cs b/src/GitReleaseManager.Core/Model/Milestone.cs index 13e1098a..e1432432 100644 --- a/src/GitReleaseManager.Core/Model/Milestone.cs +++ b/src/GitReleaseManager.Core/Model/Milestone.cs @@ -10,7 +10,7 @@ public sealed class Milestone public int PublicNumber { get; set; } - public int InternalNumber { get; set; } + public long InternalNumber { get; set; } public string HtmlUrl { get; set; } diff --git a/src/GitReleaseManager.Core/Provider/GitLabProvider.cs b/src/GitReleaseManager.Core/Provider/GitLabProvider.cs index c2371c72..d84b6e3a 100644 --- a/src/GitReleaseManager.Core/Provider/GitLabProvider.cs +++ b/src/GitReleaseManager.Core/Provider/GitLabProvider.cs @@ -34,7 +34,7 @@ public class GitLabProvider : IVcsProvider private readonly IMapper _mapper; private readonly ILogger _logger; - private int? _projectId; + private long? _projectId; public GitLabProvider(IGitLabClient gitLabClient, IMapper mapper, ILogger logger) { @@ -391,7 +391,7 @@ public string GetIssueType(Issue issue) return issue.IsPullRequest ? "Merge Request" : "Issue"; } - private int GetGitLabProjectId(string owner, string repository) + private long GetGitLabProjectId(string owner, string repository) { if (_projectId.HasValue) { diff --git a/src/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj b/src/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj index ffcbca22..97c7d106 100644 --- a/src/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj +++ b/src/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj @@ -21,6 +21,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + all diff --git a/src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj b/src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj index 71d2b2da..718a36a3 100644 --- a/src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj +++ b/src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj @@ -23,6 +23,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj b/src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj index 62d8edd0..b296f439 100644 --- a/src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj +++ b/src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj @@ -38,7 +38,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - +