evaluatePullRequestApprovalRules method

Future<EvaluatePullRequestApprovalRulesOutput> evaluatePullRequestApprovalRules({
  1. required String pullRequestId,
  2. required String revisionId,
})

Evaluates whether a pull request has met all the conditions specified in its associated approval rules.

May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException. May throw InvalidPullRequestIdException. May throw InvalidRevisionIdException. May throw PullRequestDoesNotExistException. May throw PullRequestIdRequiredException. May throw RevisionIdRequiredException. May throw RevisionNotCurrentException.

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 {
  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);
}