getPullRequestApprovalStates method
Gets information about the approval states for a specified pull request. Approval states only apply to pull requests that have one or more approval rules applied to them.
May throw PullRequestDoesNotExistException. May throw InvalidPullRequestIdException. May throw PullRequestIdRequiredException. May throw InvalidRevisionIdException. May throw RevisionIdRequiredException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.
Parameter pullRequestId
:
The system-generated ID for the pull request.
Parameter revisionId
:
The system-generated ID for the pull request revision.
Implementation
Future<GetPullRequestApprovalStatesOutput> getPullRequestApprovalStates({
required String pullRequestId,
required String revisionId,
}) async {
ArgumentError.checkNotNull(pullRequestId, 'pullRequestId');
ArgumentError.checkNotNull(revisionId, 'revisionId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.GetPullRequestApprovalStates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pullRequestId': pullRequestId,
'revisionId': revisionId,
},
);
return GetPullRequestApprovalStatesOutput.fromJson(jsonResponse.body);
}