diffCommit method

Future<DiffGitRepositoryLinkCommitResponse> diffCommit(
  1. String name, {
  2. String? baseSha,
  3. String? headSha,
  4. List<String>? pathFilters,
  5. String? $fields,
})

Diff commits for a GitRepositoryLink.

Request parameters:

name - Required. The resource name of the GitRepositoryLink. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+/gitRepositoryLinks/\[^/\]+$.

baseSha - Required. The base commit SHA or ref.

headSha - Required. The head commit SHA or ref.

pathFilters - Optional. Path patterns or exact paths to filter returned files. When path_filters is specified, FileDiff.patch is populated for all matching files (use ["**"] to include patches for all changed files). When path_filters is omitted or empty, the full list of FileDiff is returned without patch diffs (FileDiff.patch is empty).

$fields - Selector specifying which fields to include in a partial response.

Completes with a DiffGitRepositoryLinkCommitResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<DiffGitRepositoryLinkCommitResponse> diffCommit(
  core.String name, {
  core.String? baseSha,
  core.String? headSha,
  core.List<core.String>? pathFilters,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'baseSha': ?baseSha == null ? null : [baseSha],
    'headSha': ?headSha == null ? null : [headSha],
    'pathFilters': ?pathFilters,
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':diffCommit';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return DiffGitRepositoryLinkCommitResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}