postIntegrationsGithubReposImport method
Imports the selected (or all) granted repos into git.hanzo.ai.
Imports the selected (or all) granted repos into git.hanzo.ai. The selection is intersected with the installation's GRANTED set, so a client can never import a repo the App was not granted (org isolation + a grant check). The import runs in a bounded background worker (don't block the request), so the answer is 202 Accepted; poll GET /v1/integrations/github/repos for the per-repo status to flip to imported.
Parameters:
- GithubImportIn githubImportIn (required):
Implementation
Future<GithubImportOut?> postIntegrationsGithubReposImport(GithubImportIn githubImportIn,) async {
final response = await postIntegrationsGithubReposImportWithHttpInfo(githubImportIn,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GithubImportOut',) as GithubImportOut;
}
return null;
}