github / github/gh-gei

Missing parameters when calling GithubApiFactory.Create() methods

Open
#1,515 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
478
Forks
146
Avg merge
7d 21h
Merged PRs (30d)
2

Description

The `GithubApiFactory.Create()` methods are expecting three parameters:

https://github.com/github/gh-gei/blob/4fbc5e57da664f577b1adc770fec161f603fb4b0/src/Octoshift/Factories/GithubApiFactory.cs#L29-L37

There are some occurrences where these methods are called only with two parameter. In the example below the `uploadsUrl` is not passed as `null`, instead the `PAT` is used.

https://github.com/github/gh-gei/blob/4fbc5e57da664f577b1adc770fec161f603fb4b0/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs#L193-L195

For reference:

https://github.com/github/gh-gei/blob/4fbc5e57da664f577b1adc770fec161f603fb4b0/src/gei/Factories/CodeScanningAlertServiceFactory.cs#L45-L47

Contributor guide

Open the contributing guide

Research direction

Start in src/Octoshift/Factories/GithubApiFactory.cs at the Create() methods, then inspect the two-parameter call in src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs and compare it with src/gei/Factories/CodeScanningAlertServiceFactory.cs. Find all calls that omit uploadsUrl, pass the arguments in the intended order, and verify that the affected migration commands still build and behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.