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