From 94cfee3acb95629c1aaf68b3c0786f360f80387c Mon Sep 17 00:00:00 2001 From: John Campion Jr <1094820+JohnCampionJr@users.noreply.github.com> Date: Mon, 8 Jun 2026 15:26:50 -0400 Subject: [PATCH 1/4] Fix dependent propagation when a project has multiple dependents GetProjectsDependentsNames added each dependent to its set but then overwrote the entry with a fresh single-element set, so only the last dependent survived. Add to the existing set instead of replacing it. --- .changeset/fix-multiple-dependents.md | 5 ++++ .../Version/Helpers/ChangelogGenerator.cs | 7 +++-- .../Version/ChangelogGeneratorTests.cs | 30 +++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .changeset/fix-multiple-dependents.md diff --git a/.changeset/fix-multiple-dependents.md b/.changeset/fix-multiple-dependents.md new file mode 100644 index 0000000..32803c5 --- /dev/null +++ b/.changeset/fix-multiple-dependents.md @@ -0,0 +1,5 @@ +--- +"SolarWinds.Changesets": Patch +--- + +Fix `version` only bumping one dependent when a project is referenced by multiple projects. diff --git a/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs b/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs index f759077..9e339d7 100644 --- a/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs +++ b/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs @@ -80,12 +80,13 @@ private static ImmutableDictionary GetProjectsDependentsNam { foreach (string projectReferenceName in csProject.ReferencedProjectNames) { - if (csProjectNameToDependentProjects.TryGetValue(projectReferenceName, out HashSet? value)) + if (!csProjectNameToDependentProjects.TryGetValue(projectReferenceName, out HashSet? value)) { - value.Add(csProject); + value = []; + csProjectNameToDependentProjects[projectReferenceName] = value; } - csProjectNameToDependentProjects[projectReferenceName] = [csProject]; + value.Add(csProject); } } diff --git a/tests/SolarWinds.Changesets.Tests/Version/ChangelogGeneratorTests.cs b/tests/SolarWinds.Changesets.Tests/Version/ChangelogGeneratorTests.cs index 3061ffa..ad6f6b6 100644 --- a/tests/SolarWinds.Changesets.Tests/Version/ChangelogGeneratorTests.cs +++ b/tests/SolarWinds.Changesets.Tests/Version/ChangelogGeneratorTests.cs @@ -88,6 +88,36 @@ public void GetProcessedChangelogs_OneChangelogThreeProjectsOneProjectReference_ secondModule.GetNewVersion().Should().BeEquivalentTo(new Semver(1, 1, 2)); } + [Test] + public void GetProcessedChangelogs_ProjectWithTwoDependents_BumpsBothDependents() + { + ChangelogGenerator changelogGenerator = new(); + + ChangesetFile[] changesetFile = [ + new( + ["project1"], + BumpType.Minor, + "Changelog for shared project") + ]; + + // project2 and project3 both reference project1 + IEnumerable csProjects = [ + new("project1", new Semver(1, 0, 0), [], @"c:\temp"), + new("project2", new Semver(1, 0, 0), ["project1"], @"c:\temp"), + new("project3", new Semver(1, 0, 0), ["project1"], @"c:\temp") + ]; + + List processedChangelogs = changelogGenerator.GetProcessedChangelogs(changesetFile, csProjects).ToList(); + + processedChangelogs.Select(x => x.ModuleName).Should().BeEquivalentTo(["project1", "project2", "project3"]); + + ModuleChangelog project2 = processedChangelogs.First(x => x.ModuleName == "project2"); + ModuleChangelog project3 = processedChangelogs.First(x => x.ModuleName == "project3"); + + project2.GetNewVersion().Should().BeEquivalentTo(new Semver(1, 0, 1)); + project3.GetNewVersion().Should().BeEquivalentTo(new Semver(1, 0, 1)); + } + [Test] public void GetProcessedChangelogs_OneProject_ReturnsOneChangelog() { From 25fe05a91a78a611513a4df476e137948c002672 Mon Sep 17 00:00:00 2001 From: John Campion Jr <1094820+JohnCampionJr@users.noreply.github.com> Date: Mon, 8 Jun 2026 16:06:25 -0400 Subject: [PATCH 2/4] Order dependents deterministically by project name HashSet iteration order can vary between runs (records hash by value and string hashing is randomized per process), so sort dependents by name when materializing to keep output ordering stable. --- .../Commands/Version/Helpers/ChangelogGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs b/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs index 9e339d7..313db3b 100644 --- a/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs +++ b/src/SolarWinds.Changesets/Commands/Version/Helpers/ChangelogGenerator.cs @@ -90,7 +90,7 @@ private static ImmutableDictionary GetProjectsDependentsNam } } - return csProjectNameToDependentProjects.ToImmutableDictionary(pair => pair.Key, pair => pair.Value.ToArray()); + return csProjectNameToDependentProjects.ToImmutableDictionary(pair => pair.Key, pair => pair.Value.OrderBy(p => p.Name).ToArray()); } /// From 732c390335a08b56ab1b07f5f4b5d26431b29c5b Mon Sep 17 00:00:00 2001 From: Marek Magath Date: Fri, 10 Jul 2026 10:03:55 +0200 Subject: [PATCH 3/4] #28 Add doc about changesets action integration (#29) --- .changeset/nyrdfxvizwsykar.md | 5 +++++ README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .changeset/nyrdfxvizwsykar.md diff --git a/.changeset/nyrdfxvizwsykar.md b/.changeset/nyrdfxvizwsykar.md new file mode 100644 index 0000000..1a33ed6 --- /dev/null +++ b/.changeset/nyrdfxvizwsykar.md @@ -0,0 +1,5 @@ +--- +"SolarWinds.Changesets": Patch +--- + +[[#28](https://github.com/solarwinds/net-changesets/issues/28)] Added documentation for integrating net-changesets with the official Changesets GitHub Action, including custom `version` and `publish` commands, required checkout depth, status-check behavior, NuGet source configuration, and links to a working demo workflow. ([PR #29](https://github.com/solarwinds/net-changesets/pull/29)) diff --git a/README.md b/README.md index 49573e9..7291da7 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,35 @@ This .NET implementation is port from original `npm` implementation [@changesets - `publish` This publishes changes to specified nuget repository - `status` Provides information about the changesets that currently exist. If there are no changesets present, it exits with an error status code +## Changesets GitHub Action Integration with the .NET Changesets Implementation + +net-changesets can be used together with the original [changesets GitHub action](https://github.com/changesets/action). The action supports custom commands for the versioning and publishing steps, so a net-changesets tool can be used instead of the default [JavaScript-based changesets CLI tool](https://github.com/changesets/changesets). + +After each merge to the main branch, the action creates a release PR. During that step, `changeset version` converts changeset files into changelog entries and bumps C# project versions. When the release PR is merged, `changeset publish` builds and publishes NuGet packages to the configured nuget source. + +Minimal action configuration: + +```yaml +- name: Create release pull request or publish packages + uses: changesets/action@v1 + with: + version: changeset version + publish: changeset publish +``` +Just a note: we don't need to override changesets status, because both the .NET and Node.js implementations use the same behavior for this command. + +Important workflow details: + +- Checkout should use `fetch-depth: 2`, because `changeset publish` compares the last two commits to find changed packages. +- If the workflow runs `changeset status`, use `continue-on-error: true` when an empty changeset state should not fail the job. +- The publish target is controlled by the net-changesets configuration and NuGet configuration. The demo publishes to a local folder package source configured in [.changeset/config.json](https://github.com/magiino/Marekth.NetChangesets.Demo/blob/main/.changeset/config.json#L3) and [nuget.config](https://github.com/magiino/Marekth.NetChangesets.Demo/blob/main/nuget.config). + +For a complete working example, see the [net-changesets demo repository](https://github.com/magiino/Marekth.NetChangesets.Demo/tree/main), especially the configured [release workflow](https://github.com/magiino/Marekth.NetChangesets.Demo/blob/main/.github/workflows/release.yml). The workflow wires the changesets action to net-changesets through its custom command inputs, as shown around [line 44](https://github.com/magiino/Marekth.NetChangesets.Demo/blob/main/.github/workflows/release.yml#L44). It also shows the required checkout depth at [line 16](https://github.com/magiino/Marekth.NetChangesets.Demo/blob/main/.github/workflows/release.yml#L16) and a non-failing status check at [line 48](https://github.com/magiino/Marekth.NetChangesets.Demo/blob/main/.github/workflows/release.yml#L48). An example generated release PR is available at [magiino/Marekth.NetChangesets.Demo#7](https://github.com/magiino/Marekth.NetChangesets.Demo/pull/7), and the repository [commit history](https://github.com/magiino/Marekth.NetChangesets.Demo/commits/main/) shows the release flow in detail. + +**You can fork the demo repository and try the workflow yourself !!! :)** + +The changesets action can also customize the release PR title, description, commit message, and other behavior. See the action [inputs documentation](https://github.com/changesets/action?tab=readme-ov-file#inputs) for the full list of supported options. + ## Documentation - [Implementation Details of net-changesets commands](https://github.com/solarwinds/net-changesets/blob/main/docs/commands-implementation-details.md) From 6acde9a981c6ced17cb271ea8b85d5d26853de04 Mon Sep 17 00:00:00 2001 From: Jan Vilimek Date: Fri, 10 Jul 2026 10:43:33 +0200 Subject: [PATCH 4/4] Adopt .NET 10 with multitargeting (#30) * Adopt .NET 10 with multitargeting Multi-target net8.0;net10.0 for the tool and tests, bump the SDK and CI to .NET 10, and run the tests on both runtimes. AnalysisLevel tracks the TFM now; fixed the findings it surfaced (CA1515 -> internal types with InternalsVisibleTo for Moq, CA1872 -> Convert.ToHexString). * Support macOS in ProcessExecutorTests * Relax global.json SDK to a band-agnostic floor Use 10.0.100 with rollForward latestFeature so any installed .NET 10 feature band satisfies it, instead of requiring 10.0.300 or higher. * Simplified lang and analysis version for both .net versions only one lang and analysis should be supported (we will develop in .net 10, yet compile for .net 8-10) * Update target frameworks to include net9.0 * Remove LangVersion condition for net8.0 * Add target frameworks net8.0, net9.0, and net10.0 to directory.build.props * Deleted target frameworks in project file as it was moved to directory.build.props Removed net10.0 from the target frameworks. * Deleted target frameworks in project file as it was moved to directory.build.props * Update .NET version to 10.0.x in CI workflow for building all .net 8-10 we just need the .net 10 sdk * Update adopt-dotnet-10.md --------- Co-authored-by: John Campion Jr <1094820+JohnCampionJr@users.noreply.github.com> --- .changeset/adopt-dotnet-10.md | 5 +++++ .github/workflows/ci.yml | 2 +- .github/workflows/codeql.yml | 2 +- Directory.Build.props | 8 +++----- global.json | 2 +- .../Commands/Add/IProjectFileNamesLocator.cs | 2 +- .../Commands/Publish/Services/DotnetService.cs | 2 +- .../Commands/Publish/Services/GitService.cs | 2 +- .../Commands/Publish/Services/IDotnetService.cs | 2 +- .../Commands/Publish/Services/IGitService.cs | 2 +- src/SolarWinds.Changesets/Shared/BumpType.cs | 2 +- src/SolarWinds.Changesets/Shared/ChangesetConfig.cs | 2 +- src/SolarWinds.Changesets/Shared/ChangesetFile.cs | 2 +- src/SolarWinds.Changesets/Shared/Constants.cs | 2 +- src/SolarWinds.Changesets/Shared/IChangesetsRepository.cs | 2 +- src/SolarWinds.Changesets/Shared/IConfigurationService.cs | 2 +- src/SolarWinds.Changesets/Shared/IProcessExecutor.cs | 2 +- .../Shared/InitializationException.cs | 2 +- src/SolarWinds.Changesets/Shared/ProcessExecutor.cs | 2 +- src/SolarWinds.Changesets/Shared/ProcessOutput.cs | 2 +- src/SolarWinds.Changesets/Shared/ResultCodes.cs | 2 +- src/SolarWinds.Changesets/SolarWinds.Changesets.csproj | 1 + tests/SolarWinds.Changesets.Tests/ProcessExecutorTests.cs | 2 +- .../Version/CsProjectsRepositoryTests.cs | 2 +- 24 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 .changeset/adopt-dotnet-10.md diff --git a/.changeset/adopt-dotnet-10.md b/.changeset/adopt-dotnet-10.md new file mode 100644 index 0000000..d72e657 --- /dev/null +++ b/.changeset/adopt-dotnet-10.md @@ -0,0 +1,5 @@ +--- +"SolarWinds.Changesets": Minor +--- + +Adopt .NET 10 with multi-targeting. The tool and tests now target `net8.0`, `net9.0` and `net10.0`, the SDK and CI use .NET 10. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f724d3f..860222e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.406 + dotnet-version: 10.0.x - name: Restore dependencies run: dotnet restore --packages ./packages diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9b059ba..f38fd12 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -33,7 +33,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.406 + dotnet-version: 10.0.x - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/Directory.Build.props b/Directory.Build.props index 3cea168..66bc774 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,9 +3,8 @@ - net8.0 - - 12.0 + net8.0;net9.0;net10.0 + 14.0 @@ -25,8 +24,7 @@ true false true - - 8 + 10 all true diff --git a/global.json b/global.json index 952b4c4..512142d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.406", + "version": "10.0.100", "rollForward": "latestFeature" } } diff --git a/src/SolarWinds.Changesets/Commands/Add/IProjectFileNamesLocator.cs b/src/SolarWinds.Changesets/Commands/Add/IProjectFileNamesLocator.cs index 05140d3..3462df8 100644 --- a/src/SolarWinds.Changesets/Commands/Add/IProjectFileNamesLocator.cs +++ b/src/SolarWinds.Changesets/Commands/Add/IProjectFileNamesLocator.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Commands.Add; /// /// Defines a contract for locating project file names within a specified directory. /// -public interface IProjectFileNamesLocator +internal interface IProjectFileNamesLocator { /// /// Retrieves project file names located in the specified directory. diff --git a/src/SolarWinds.Changesets/Commands/Publish/Services/DotnetService.cs b/src/SolarWinds.Changesets/Commands/Publish/Services/DotnetService.cs index 3a318e2..b81fab8 100644 --- a/src/SolarWinds.Changesets/Commands/Publish/Services/DotnetService.cs +++ b/src/SolarWinds.Changesets/Commands/Publish/Services/DotnetService.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Commands.Publish.Services; /// -public sealed class DotnetService : IDotnetService +internal sealed class DotnetService : IDotnetService { private readonly IProcessExecutor _processExecutor; diff --git a/src/SolarWinds.Changesets/Commands/Publish/Services/GitService.cs b/src/SolarWinds.Changesets/Commands/Publish/Services/GitService.cs index afb837e..7030e70 100644 --- a/src/SolarWinds.Changesets/Commands/Publish/Services/GitService.cs +++ b/src/SolarWinds.Changesets/Commands/Publish/Services/GitService.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Commands.Publish.Services; /// -public sealed class GitService : IGitService +internal sealed class GitService : IGitService { private readonly IProcessExecutor _processExecutor; diff --git a/src/SolarWinds.Changesets/Commands/Publish/Services/IDotnetService.cs b/src/SolarWinds.Changesets/Commands/Publish/Services/IDotnetService.cs index 4d5e495..c7bda24 100644 --- a/src/SolarWinds.Changesets/Commands/Publish/Services/IDotnetService.cs +++ b/src/SolarWinds.Changesets/Commands/Publish/Services/IDotnetService.cs @@ -5,7 +5,7 @@ namespace SolarWinds.Changesets.Commands.Publish.Services; /// /// Provides functionality to interact with the .NET CLI for operations such as packing and publishing NuGet packages. /// -public interface IDotnetService +internal interface IDotnetService { /// /// Packs a .NET project into a NuGet package. diff --git a/src/SolarWinds.Changesets/Commands/Publish/Services/IGitService.cs b/src/SolarWinds.Changesets/Commands/Publish/Services/IGitService.cs index 1b3e79a..9527b00 100644 --- a/src/SolarWinds.Changesets/Commands/Publish/Services/IGitService.cs +++ b/src/SolarWinds.Changesets/Commands/Publish/Services/IGitService.cs @@ -5,7 +5,7 @@ namespace SolarWinds.Changesets.Commands.Publish.Services; /// /// Provides Git-related services, such as retrieving file differences. /// -public interface IGitService +internal interface IGitService { /// /// Retrieves a list of file names that have changed in the specified source path. diff --git a/src/SolarWinds.Changesets/Shared/BumpType.cs b/src/SolarWinds.Changesets/Shared/BumpType.cs index 92d795e..73fa3fd 100644 --- a/src/SolarWinds.Changesets/Shared/BumpType.cs +++ b/src/SolarWinds.Changesets/Shared/BumpType.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Specifies the type of version bump to apply. /// -public enum BumpType +internal enum BumpType { /// /// No version bump. diff --git a/src/SolarWinds.Changesets/Shared/ChangesetConfig.cs b/src/SolarWinds.Changesets/Shared/ChangesetConfig.cs index 944bb8f..f23e72d 100644 --- a/src/SolarWinds.Changesets/Shared/ChangesetConfig.cs +++ b/src/SolarWinds.Changesets/Shared/ChangesetConfig.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Changeset config. /// -public sealed class ChangesetConfig +internal sealed class ChangesetConfig { /// /// Specify the relative path from the changeset command's execution folder to the location of the projects. diff --git a/src/SolarWinds.Changesets/Shared/ChangesetFile.cs b/src/SolarWinds.Changesets/Shared/ChangesetFile.cs index ad45086..1236d07 100644 --- a/src/SolarWinds.Changesets/Shared/ChangesetFile.cs +++ b/src/SolarWinds.Changesets/Shared/ChangesetFile.cs @@ -6,4 +6,4 @@ namespace SolarWinds.Changesets.Shared; /// Changed module names. /// Bump type. /// Description. -public sealed record ChangesetFile(ICollection ChangedModuleNames, BumpType BumpType, string Description); +internal sealed record ChangesetFile(ICollection ChangedModuleNames, BumpType BumpType, string Description); diff --git a/src/SolarWinds.Changesets/Shared/Constants.cs b/src/SolarWinds.Changesets/Shared/Constants.cs index ff78376..0b6c48d 100644 --- a/src/SolarWinds.Changesets/Shared/Constants.cs +++ b/src/SolarWinds.Changesets/Shared/Constants.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Provides application-wide constant values of file names and file path. /// -public static class Constants +internal static class Constants { /// /// The file name of the changelog file. diff --git a/src/SolarWinds.Changesets/Shared/IChangesetsRepository.cs b/src/SolarWinds.Changesets/Shared/IChangesetsRepository.cs index f2f4d69..a50e49b 100644 --- a/src/SolarWinds.Changesets/Shared/IChangesetsRepository.cs +++ b/src/SolarWinds.Changesets/Shared/IChangesetsRepository.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Defines methods for accessing and managing changesets. /// -public interface IChangesetsRepository +internal interface IChangesetsRepository { /// /// Creates changeset file in the changeset working directory. diff --git a/src/SolarWinds.Changesets/Shared/IConfigurationService.cs b/src/SolarWinds.Changesets/Shared/IConfigurationService.cs index 9d627d4..9708e11 100644 --- a/src/SolarWinds.Changesets/Shared/IConfigurationService.cs +++ b/src/SolarWinds.Changesets/Shared/IConfigurationService.cs @@ -7,7 +7,7 @@ namespace SolarWinds.Changesets.Shared; /// This service allows creating a default configuration file and retrieving an existing configuration file. /// It uses JSON serialization and deserialization to handle the configuration data. /// -public interface IConfigurationService +internal interface IConfigurationService { /// diff --git a/src/SolarWinds.Changesets/Shared/IProcessExecutor.cs b/src/SolarWinds.Changesets/Shared/IProcessExecutor.cs index caf8188..e23aab4 100644 --- a/src/SolarWinds.Changesets/Shared/IProcessExecutor.cs +++ b/src/SolarWinds.Changesets/Shared/IProcessExecutor.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Executes external processes and captures their output and exit code. /// -public interface IProcessExecutor +internal interface IProcessExecutor { /// /// Executes a process with the specified executable, arguments, and working directory. diff --git a/src/SolarWinds.Changesets/Shared/InitializationException.cs b/src/SolarWinds.Changesets/Shared/InitializationException.cs index c6270fd..3048300 100644 --- a/src/SolarWinds.Changesets/Shared/InitializationException.cs +++ b/src/SolarWinds.Changesets/Shared/InitializationException.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Represents errors that occur during the initialization phase. /// -public sealed class InitializationException : Exception +internal sealed class InitializationException : Exception { /// /// Initializes a new instance of the class diff --git a/src/SolarWinds.Changesets/Shared/ProcessExecutor.cs b/src/SolarWinds.Changesets/Shared/ProcessExecutor.cs index bd1ed31..86b68cb 100644 --- a/src/SolarWinds.Changesets/Shared/ProcessExecutor.cs +++ b/src/SolarWinds.Changesets/Shared/ProcessExecutor.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// -public class ProcessExecutor : IProcessExecutor +internal class ProcessExecutor : IProcessExecutor { /// public async Task Execute(string executable, string arguments, string workingDirectoryPath) diff --git a/src/SolarWinds.Changesets/Shared/ProcessOutput.cs b/src/SolarWinds.Changesets/Shared/ProcessOutput.cs index 70b3242..bf3bb03 100644 --- a/src/SolarWinds.Changesets/Shared/ProcessOutput.cs +++ b/src/SolarWinds.Changesets/Shared/ProcessOutput.cs @@ -5,4 +5,4 @@ namespace SolarWinds.Changesets.Shared; /// /// The list of output lines from the process. /// The exit code of the process. -public record ProcessOutput(ICollection Output, int ExitCode); +internal record ProcessOutput(ICollection Output, int ExitCode); diff --git a/src/SolarWinds.Changesets/Shared/ResultCodes.cs b/src/SolarWinds.Changesets/Shared/ResultCodes.cs index 7608d5d..92b50a7 100644 --- a/src/SolarWinds.Changesets/Shared/ResultCodes.cs +++ b/src/SolarWinds.Changesets/Shared/ResultCodes.cs @@ -3,7 +3,7 @@ namespace SolarWinds.Changesets.Shared; /// /// Defines command result codes with documentation. /// -public static class ResultCodes +internal static class ResultCodes { #region Success Codes diff --git a/src/SolarWinds.Changesets/SolarWinds.Changesets.csproj b/src/SolarWinds.Changesets/SolarWinds.Changesets.csproj index 1a47387..64cb23d 100644 --- a/src/SolarWinds.Changesets/SolarWinds.Changesets.csproj +++ b/src/SolarWinds.Changesets/SolarWinds.Changesets.csproj @@ -41,6 +41,7 @@ + diff --git a/tests/SolarWinds.Changesets.Tests/ProcessExecutorTests.cs b/tests/SolarWinds.Changesets.Tests/ProcessExecutorTests.cs index 8dc65fe..280e6ab 100644 --- a/tests/SolarWinds.Changesets.Tests/ProcessExecutorTests.cs +++ b/tests/SolarWinds.Changesets.Tests/ProcessExecutorTests.cs @@ -21,7 +21,7 @@ public void SetUp() _executable = "cmd"; _argumentsTemplate = '/'; } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { _executable = "/bin/bash"; _argumentsTemplate = '-'; diff --git a/tests/SolarWinds.Changesets.Tests/Version/CsProjectsRepositoryTests.cs b/tests/SolarWinds.Changesets.Tests/Version/CsProjectsRepositoryTests.cs index 54eb16a..36486c7 100644 --- a/tests/SolarWinds.Changesets.Tests/Version/CsProjectsRepositoryTests.cs +++ b/tests/SolarWinds.Changesets.Tests/Version/CsProjectsRepositoryTests.cs @@ -125,6 +125,6 @@ private static string ComputeFileHash(string path) using FileStream stream = File.OpenRead(path); byte[] hashBytes = sha256.ComputeHash(stream); - return BitConverter.ToString(hashBytes).Replace("-", "", StringComparison.Ordinal).ToUpperInvariant(); + return Convert.ToHexString(hashBytes); } }