updatePullRequestStatus method
- required String pullRequestId,
- required PullRequestStatusEnum pullRequestStatus,
Updates the status of a pull request.
May throw EncryptionIntegrityChecksFailedException.
May throw EncryptionKeyAccessDeniedException.
May throw EncryptionKeyDisabledException.
May throw EncryptionKeyNotFoundException.
May throw EncryptionKeyUnavailableException.
May throw InvalidPullRequestIdException.
May throw InvalidPullRequestStatusException.
May throw InvalidPullRequestStatusUpdateException.
May throw PullRequestDoesNotExistException.
May throw PullRequestIdRequiredException.
May throw PullRequestStatusRequiredException.
Parameter pullRequestId :
The system-generated ID of the pull request. To get this ID, use
ListPullRequests.
Parameter pullRequestStatus :
The status of the pull request. The only valid operations are to update
the status from OPEN to OPEN, OPEN
to CLOSED or from CLOSED to CLOSED.
Implementation
Future<UpdatePullRequestStatusOutput> updatePullRequestStatus({
required String pullRequestId,
required PullRequestStatusEnum pullRequestStatus,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.UpdatePullRequestStatus'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pullRequestId': pullRequestId,
'pullRequestStatus': pullRequestStatus.value,
},
);
return UpdatePullRequestStatusOutput.fromJson(jsonResponse.body);
}