Add missing parameter values for GithubApiFactory create methods#1516
Open
akordowski wants to merge 1 commit intogithub:mainfrom
Open
Add missing parameter values for GithubApiFactory create methods#1516akordowski wants to merge 1 commit intogithub:mainfrom
akordowski wants to merge 1 commit intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where GithubApiFactory.Create() and CreateClientNoSsl() methods were being called with only two parameters instead of the required three. Due to the optional parameters with default values in the interface definitions, the code compiled but incorrectly assigned the Personal Access Token (PAT) to the uploadsUrl parameter instead of the token parameter.
Changes:
- Fixed parameter ordering in
MigrateRepoCommand.csto include the missinguploadsUrlparameter (passingnull) - Fixed parameter ordering in
WaitForMigrationCommandBase.csto include the missinguploadsUrlparameter (passingnull) - Fixed parameter ordering in
AbortMigrationCommandBase.csto include the missinguploadsUrlparameter (passingnull) - Updated test methods in
GithubApiFactoryTests.csto use the correct three-parameter signature
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs | Fixed both Create() and CreateClientNoSsl() calls to pass null for the uploadsUrl parameter |
| src/OctoshiftCLI.Tests/Octoshift/Factories/GithubApiFactoryTests.cs | Updated three test methods to pass null for the uploadsUrl parameter |
| src/Octoshift/Commands/WaitForMigration/WaitForMigrationCommandBase.cs | Fixed Create() call to pass null for the uploadsUrl parameter |
| src/Octoshift/Commands/AbortMigration/AbortMigrationCommandBase.cs | Fixed Create() call to pass null for the uploadsUrl parameter |
Unit Test Results 1 files 1 suites 10m 24s ⏱️ Results for commit 300ec1c. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ThirdPartyNotices.txt(if applicable)This PR addresses the issue #1515. It adds missing values for the
uploadsUrlparameter.