overridePullRequestApprovalRules method
Sets aside (overrides) all approval rule requirements for a specified pull request.
May throw EncryptionIntegrityChecksFailedException.
May throw EncryptionKeyAccessDeniedException.
May throw EncryptionKeyDisabledException.
May throw EncryptionKeyNotFoundException.
May throw EncryptionKeyUnavailableException.
May throw InvalidOverrideStatusException.
May throw InvalidPullRequestIdException.
May throw InvalidRevisionIdException.
May throw OverrideAlreadySetException.
May throw OverrideStatusRequiredException.
May throw PullRequestAlreadyClosedException.
May throw PullRequestDoesNotExistException.
May throw PullRequestIdRequiredException.
May throw RevisionIdRequiredException.
May throw RevisionNotCurrentException.
Parameter overrideStatus :
Whether you want to set aside approval rule requirements for the pull
request (OVERRIDE) or revoke a previous override and apply approval rule
requirements (REVOKE). REVOKE status is not stored.
Parameter pullRequestId :
The system-generated ID of the pull request for which you want to override
all approval rule requirements. To get this information, use
GetPullRequest.
Parameter revisionId :
The system-generated ID of the most recent revision of the pull request.
You cannot override approval rules for anything but the most recent
revision of a pull request. To get the revision ID, use GetPullRequest.
Implementation
Future<void> overridePullRequestApprovalRules({
required OverrideStatus overrideStatus,
required String pullRequestId,
required String revisionId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.OverridePullRequestApprovalRules'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'overrideStatus': overrideStatus.value,
'pullRequestId': pullRequestId,
'revisionId': revisionId,
},
);
}