updatePullRequestDescription method

Future<UpdatePullRequestDescriptionOutput> updatePullRequestDescription({
  1. required String description,
  2. required String pullRequestId,
})

Replaces the contents of the description of a pull request.

May throw InvalidDescriptionException. May throw InvalidPullRequestIdException. May throw PullRequestAlreadyClosedException. May throw PullRequestDoesNotExistException. May throw PullRequestIdRequiredException.

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 {
  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);
}