overridePullRequestApprovalRules method
- required OverrideStatus overrideStatus,
- required String pullRequestId,
- required String revisionId,
Sets aside (overrides) all approval rule requirements for a specified pull request.
May throw PullRequestDoesNotExistException. May throw InvalidPullRequestIdException. May throw PullRequestIdRequiredException. May throw InvalidRevisionIdException. May throw RevisionIdRequiredException. May throw InvalidOverrideStatusException. May throw OverrideStatusRequiredException. May throw OverrideAlreadySetException. May throw RevisionNotCurrentException. May throw PullRequestAlreadyClosedException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.
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 {
ArgumentError.checkNotNull(overrideStatus, 'overrideStatus');
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.OverridePullRequestApprovalRules'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'overrideStatus': overrideStatus.toValue(),
'pullRequestId': pullRequestId,
'revisionId': revisionId,
},
);
}