postIntegrationsGithubReposByRepoPagesWithHttpInfo method

Future<Response> postIntegrationsGithubReposByRepoPagesWithHttpInfo(
  1. String repo,
  2. GithubPagesEnableReq githubPagesEnableReq
)

Creates the repo's Pages site and answers 201 Created with it.

Creates the repo's Pages site and answers 201 Created with it. With buildType "workflow" the site builds via GitHub Actions; otherwise it builds from a branch source, defaulting to the repo's own default branch when none is given. Only "/" and "/docs" are legal source paths (GitHub's rule).

Note: This method returns the HTTP Response.

Parameters:

  • String repo (required): Repo is the repository, from the :repo path segment.

  • GithubPagesEnableReq githubPagesEnableReq (required):

Implementation

Future<Response> postIntegrationsGithubReposByRepoPagesWithHttpInfo(String repo, GithubPagesEnableReq githubPagesEnableReq,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/integrations/github/repos/{repo}/pages'
    .replaceAll('{repo}', repo);

  // ignore: prefer_final_locals
  Object? postBody = githubPagesEnableReq;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}