getPullRequest method

Future<GetPullRequestOutput> getPullRequest({
  1. required String pullRequestId,
})

Gets information about a pull request in a specified repository.

May throw PullRequestDoesNotExistException. May throw InvalidPullRequestIdException. May throw PullRequestIdRequiredException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.

Parameter pullRequestId : The system-generated ID of the pull request. To get this ID, use ListPullRequests.

Implementation

Future<GetPullRequestOutput> getPullRequest({
  required String pullRequestId,
}) async {
  ArgumentError.checkNotNull(pullRequestId, 'pullRequestId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeCommit_20150413.GetPullRequest'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'pullRequestId': pullRequestId,
    },
  );

  return GetPullRequestOutput.fromJson(jsonResponse.body);
}