getPullRequestOverrideState method

Future<GetPullRequestOverrideStateOutput> getPullRequestOverrideState({
  1. required String pullRequestId,
  2. required String revisionId,
})

Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.

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 ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).

Parameter revisionId : The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use GetPullRequest.

Implementation

Future<GetPullRequestOverrideStateOutput> getPullRequestOverrideState({
  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.GetPullRequestOverrideState'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'pullRequestId': pullRequestId,
      'revisionId': revisionId,
    },
  );

  return GetPullRequestOverrideStateOutput.fromJson(jsonResponse.body);
}