postCommentReply method
Posts a comment in reply to an existing comment on a comparison between commits or a pull request.
May throw ClientRequestTokenRequiredException. May throw InvalidClientRequestTokenException. May throw IdempotencyParameterMismatchException. May throw CommentContentRequiredException. May throw CommentContentSizeLimitExceededException. May throw CommentDoesNotExistException. May throw CommentIdRequiredException. May throw InvalidCommentIdException.
Parameter content
:
The contents of your reply to a comment.
Parameter inReplyTo
:
The system-generated ID of the comment to which you want to reply. To get
this ID, use GetCommentsForComparedCommit or
GetCommentsForPullRequest.
Parameter clientRequestToken
:
A unique, client-generated idempotency token that, when provided in a
request, ensures the request cannot be repeated with a changed parameter.
If a request is received with the same parameters and a token is included,
the request returns information about the initial request that used that
token.
Implementation
Future<PostCommentReplyOutput> postCommentReply({
required String content,
required String inReplyTo,
String? clientRequestToken,
}) async {
ArgumentError.checkNotNull(content, 'content');
ArgumentError.checkNotNull(inReplyTo, 'inReplyTo');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.PostCommentReply'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'content': content,
'inReplyTo': inReplyTo,
'clientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
},
);
return PostCommentReplyOutput.fromJson(jsonResponse.body);
}