batchGetCommits method

Future<BatchGetCommitsOutput> batchGetCommits({
  1. required List<String> commitIds,
  2. required String repositoryName,
})

Returns information about the contents of one or more commits in a repository.

May throw CommitIdsListRequiredException. May throw CommitIdsLimitExceededException. May throw RepositoryNameRequiredException. May throw InvalidRepositoryNameException. May throw RepositoryDoesNotExistException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.

Parameter commitIds : The full commit IDs of the commits to get information about.

Parameter repositoryName : The name of the repository that contains the commits.

Implementation

Future<BatchGetCommitsOutput> batchGetCommits({
  required List<String> commitIds,
  required String repositoryName,
}) async {
  ArgumentError.checkNotNull(commitIds, 'commitIds');
  ArgumentError.checkNotNull(repositoryName, 'repositoryName');
  _s.validateStringLength(
    'repositoryName',
    repositoryName,
    1,
    100,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeCommit_20150413.BatchGetCommits'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'commitIds': commitIds,
      'repositoryName': repositoryName,
    },
  );

  return BatchGetCommitsOutput.fromJson(jsonResponse.body);
}