Skip to content

Commit

Permalink
(#633) Update to latest NGitLab package version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gep13 committed Jan 9, 2025
1 parent b392871 commit a1458d3
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
Expand Down
2 changes: 1 addition & 1 deletion src/GitReleaseManager.Core/GitReleaseManager.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="6.51.1" />
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Scriban" Version="5.10.0" />
<PackageReference Include="seriloganalyzer" Version="0.15.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/GitReleaseManager.Core/Model/Milestone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Check warning on line 15 in src/GitReleaseManager.Core/Model/Milestone.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022)

Change the type of property 'Milestone.HtmlUrl' from 'string' to 'System.Uri' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1056)

Expand Down
4 changes: 2 additions & 2 deletions src/GitReleaseManager.Core/Provider/GitLabProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
1 change: 1 addition & 0 deletions src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
Expand Down
2 changes: 1 addition & 1 deletion src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="6.51.1" />
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" PrivateAssets="All" />
Expand Down

0 comments on commit a1458d3

Please sign in to comment.