getIntegrationsGithubReposByRepoPages method

Future<GithubPagesView?> getIntegrationsGithubReposByRepoPages(
  1. String repo
)

Returns the repo's Pages status, live URL, custom domain and build source.

Returns the repo's Pages status, live URL, custom domain and build source. The repo is resolved against the org installation's GRANTED set, so a caller can never address a repo the App was not granted; 404 when the repo has no Pages site.

Parameters:

  • String repo (required): Repo is the repository's short name within the org's installation, with no owner prefix (the owner is server-derived from the grant). A trailing ".git" is stripped.

Implementation

Future<GithubPagesView?> getIntegrationsGithubReposByRepoPages(String repo,) async {
  final response = await getIntegrationsGithubReposByRepoPagesWithHttpInfo(repo,);
  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), 'GithubPagesView',) as GithubPagesView;

  }
  return null;
}