The GithubApiFactory.Create() methods are expecting three parameters:
|
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.
|
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:
|
var sourceGithubApi = sourceApiNoSsl |
|
? _sourceGithubApiFactory.CreateClientNoSsl(sourceApi, null, sourceToken) |
|
: _sourceGithubApiFactory.Create(sourceApi, null, sourceToken); |
The
GithubApiFactory.Create()methods are expecting three parameters:gh-gei/src/Octoshift/Factories/GithubApiFactory.cs
Lines 29 to 37 in 4fbc5e5
There are some occurrences where these methods are called only with two parameter. In the example below the
uploadsUrlis not passed asnull, instead thePATis used.gh-gei/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs
Lines 193 to 195 in 4fbc5e5
For reference:
gh-gei/src/gei/Factories/CodeScanningAlertServiceFactory.cs
Lines 45 to 47 in 4fbc5e5