evaluatePullRequestApprovalRules method
Evaluates whether a pull request has met all the conditions specified in its associated approval rules.
May throw PullRequestDoesNotExistException. May throw InvalidPullRequestIdException. May throw PullRequestIdRequiredException. May throw InvalidRevisionIdException. May throw RevisionIdRequiredException. May throw RevisionNotCurrentException. 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 you want to evaluate.
Parameter revisionId
:
The system-generated ID for the pull request revision. To retrieve the
most recent revision ID for a pull request, use GetPullRequest.
Implementation
Future<EvaluatePullRequestApprovalRulesOutput>
evaluatePullRequestApprovalRules({
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.EvaluatePullRequestApprovalRules'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pullRequestId': pullRequestId,
'revisionId': revisionId,
},
);
return EvaluatePullRequestApprovalRulesOutput.fromJson(jsonResponse.body);
}