updatePullRequestDescription method
Replaces the contents of the description of a pull request.
May throw PullRequestDoesNotExistException. May throw InvalidPullRequestIdException. May throw PullRequestIdRequiredException. May throw InvalidDescriptionException. May throw PullRequestAlreadyClosedException.
Parameter description
:
The updated content of the description for the pull request. This content
replaces the existing description.
Parameter pullRequestId
:
The system-generated ID of the pull request. To get this ID, use
ListPullRequests.
Implementation
Future<UpdatePullRequestDescriptionOutput> updatePullRequestDescription({
required String description,
required String pullRequestId,
}) async {
ArgumentError.checkNotNull(description, 'description');
_s.validateStringLength(
'description',
description,
0,
10240,
isRequired: true,
);
ArgumentError.checkNotNull(pullRequestId, 'pullRequestId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.UpdatePullRequestDescription'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'description': description,
'pullRequestId': pullRequestId,
},
);
return UpdatePullRequestDescriptionOutput.fromJson(jsonResponse.body);
}