getIntegrationsGithubRepos method

Future<GithubReposOut?> getIntegrationsGithubRepos()

Lists the org's granted GitHub repositories, each annotated with its native import + sync status from the git object plane.

Lists the org's granted GitHub repositories, each annotated with its native import + sync status from the git object plane. Org-authed: the org comes from the validated principal, and the granted set is bounded to THAT org's installation token — an org can never enumerate another org's repos. The console polls it to watch an import flip a repo to imported.

Implementation

Future<GithubReposOut?> getIntegrationsGithubRepos() async {
  final response = await getIntegrationsGithubReposWithHttpInfo();
  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), 'GithubReposOut',) as GithubReposOut;

  }
  return null;
}