-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The GithubApiFactory.Create() methods are expecting three parameters:
gh-gei/src/Octoshift/Factories/GithubApiFactory.cs
Lines 29 to 37 in 4fbc5e5
| GithubApi ISourceGithubApiFactory.Create(string apiUrl, string uploadsUrl, string sourcePersonalAccessToken) | |
| { | |
| apiUrl ??= DEFAULT_API_URL; | |
| uploadsUrl ??= DEFAULT_UPLOADS_URL; | |
| sourcePersonalAccessToken ??= _environmentVariableProvider.SourceGithubPersonalAccessToken(); | |
| var githubClient = new GithubClient(_octoLogger, _clientFactory.CreateClient("Default"), _versionProvider, _retryPolicy, _dateTimeProvider, sourcePersonalAccessToken); | |
| var multipartUploader = new ArchiveUploader(githubClient, uploadsUrl, _octoLogger, _retryPolicy, _environmentVariableProvider); | |
| return new GithubApi(githubClient, apiUrl, _retryPolicy, multipartUploader); | |
| } |
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.
gh-gei/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs
Lines 193 to 195 in 4fbc5e5
| var httpDownloadServiceFactory = sp.GetRequiredService<HttpDownloadServiceFactory>(); | |
| ghesApi = args.NoSslVerify ? sourceGithubApiFactory.CreateClientNoSsl(args.GhesApiUrl, args.GithubSourcePat) : sourceGithubApiFactory.Create(args.GhesApiUrl, args.GithubSourcePat); | |
| httpDownloadService = args.NoSslVerify ? httpDownloadServiceFactory.CreateClientNoSsl() : httpDownloadServiceFactory.CreateDefault(); |
For reference:
gh-gei/src/gei/Factories/CodeScanningAlertServiceFactory.cs
Lines 45 to 47 in 4fbc5e5
| var sourceGithubApi = sourceApiNoSsl | |
| ? _sourceGithubApiFactory.CreateClientNoSsl(sourceApi, null, sourceToken) | |
| : _sourceGithubApiFactory.Create(sourceApi, null, sourceToken); |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.