From 300ec1cd2d1120f0bc79b60c6ee4e180f1005604 Mon Sep 17 00:00:00 2001 From: Artur Kordowski <9746197+akordowski@users.noreply.github.com> Date: Thu, 26 Feb 2026 10:01:21 +0100 Subject: [PATCH] Add missing parameter values for GithubApiFactory create methods --- .../Commands/AbortMigration/AbortMigrationCommandBase.cs | 2 +- .../WaitForMigration/WaitForMigrationCommandBase.cs | 2 +- .../Octoshift/Factories/GithubApiFactoryTests.cs | 6 +++--- src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Octoshift/Commands/AbortMigration/AbortMigrationCommandBase.cs b/src/Octoshift/Commands/AbortMigration/AbortMigrationCommandBase.cs index 12b461ba3..7b487302d 100644 --- a/src/Octoshift/Commands/AbortMigration/AbortMigrationCommandBase.cs +++ b/src/Octoshift/Commands/AbortMigration/AbortMigrationCommandBase.cs @@ -55,7 +55,7 @@ public override AbortMigrationCommandHandler BuildHandler(AbortMigrationCommandA } var log = sp.GetRequiredService(); - var githubApi = sp.GetRequiredService().Create(args.TargetApiUrl, args.GithubPat); + var githubApi = sp.GetRequiredService().Create(args.TargetApiUrl, null, args.GithubPat); return new AbortMigrationCommandHandler(log, githubApi); } diff --git a/src/Octoshift/Commands/WaitForMigration/WaitForMigrationCommandBase.cs b/src/Octoshift/Commands/WaitForMigration/WaitForMigrationCommandBase.cs index e40863ff7..45e574ad5 100644 --- a/src/Octoshift/Commands/WaitForMigration/WaitForMigrationCommandBase.cs +++ b/src/Octoshift/Commands/WaitForMigration/WaitForMigrationCommandBase.cs @@ -54,7 +54,7 @@ public override WaitForMigrationCommandHandler BuildHandler(WaitForMigrationComm } var log = sp.GetRequiredService(); - var githubApi = sp.GetRequiredService().Create(args.TargetApiUrl, args.GithubPat); + var githubApi = sp.GetRequiredService().Create(args.TargetApiUrl, null, args.GithubPat); var warningsCountLogger = sp.GetRequiredService(); return new WaitForMigrationCommandHandler(log, githubApi, warningsCountLogger); diff --git a/src/OctoshiftCLI.Tests/Octoshift/Factories/GithubApiFactoryTests.cs b/src/OctoshiftCLI.Tests/Octoshift/Factories/GithubApiFactoryTests.cs index 95e844d2b..f131571d9 100644 --- a/src/OctoshiftCLI.Tests/Octoshift/Factories/GithubApiFactoryTests.cs +++ b/src/OctoshiftCLI.Tests/Octoshift/Factories/GithubApiFactoryTests.cs @@ -200,7 +200,7 @@ public async Task GithubApiFactory_Should_Use_The_Default_Github_Api_Url_If_Pass .Returns(httpClient); // Act - var githubApi = _sourceGithubApiFactory.Create(null, SOURCE_GH_PAT); + var githubApi = _sourceGithubApiFactory.Create(null, null, SOURCE_GH_PAT); await githubApi.DeleteRepo("org", "repo"); // call a simple/random API method just for the sake of verifying the base API url // Assert @@ -230,7 +230,7 @@ public async Task GithubApiFactory_Should_Use_The_Default_Github_Api_Url_If_Pass .Returns(httpClient); // Act - var githubApi = _targetGithubApiFactory.Create(null, TARGET_GH_PAT); + var githubApi = _targetGithubApiFactory.Create(null, null, TARGET_GH_PAT); await githubApi.DeleteRepo("org", "repo"); // call a simple/random API method just for the sake of verifying the base API url // Assert @@ -261,7 +261,7 @@ public async Task GithubApiFactory_Should_Use_The_Default_Github_Api_Url_If_Pass .Returns(httpClient); // Act - var githubApi = _sourceGithubApiFactory.CreateClientNoSsl(null, SOURCE_GH_PAT); + var githubApi = _sourceGithubApiFactory.CreateClientNoSsl(null, null, SOURCE_GH_PAT); await githubApi.DeleteRepo("org", "repo"); // call a simple/random API method just for the sake of verifying the base API url // Assert diff --git a/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs b/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs index 409dce2d5..eee3e39a3 100644 --- a/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs +++ b/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs @@ -191,7 +191,7 @@ public override MigrateRepoCommandHandler BuildHandler(MigrateRepoCommandArgs ar var awsApiFactory = sp.GetRequiredService(); var azureApiFactory = sp.GetRequiredService(); var httpDownloadServiceFactory = sp.GetRequiredService(); - ghesApi = args.NoSslVerify ? sourceGithubApiFactory.CreateClientNoSsl(args.GhesApiUrl, args.GithubSourcePat) : sourceGithubApiFactory.Create(args.GhesApiUrl, args.GithubSourcePat); + ghesApi = args.NoSslVerify ? sourceGithubApiFactory.CreateClientNoSsl(args.GhesApiUrl, null, args.GithubSourcePat) : sourceGithubApiFactory.Create(args.GhesApiUrl, null, args.GithubSourcePat); httpDownloadService = args.NoSslVerify ? httpDownloadServiceFactory.CreateClientNoSsl() : httpDownloadServiceFactory.CreateDefault(); if (args.AzureStorageConnectionString.HasValue() || environmentVariableProvider.AzureStorageConnectionString(false).HasValue())