describePullRequestEvents method
- required String pullRequestId,
- String? actorArn,
- int? maxResults,
- String? nextToken,
- PullRequestEventType? pullRequestEventType,
Returns information about one or more pull request events.
May throw PullRequestDoesNotExistException. May throw InvalidPullRequestIdException. May throw PullRequestIdRequiredException. May throw InvalidPullRequestEventTypeException. May throw InvalidActorArnException. May throw ActorDoesNotExistException. May throw InvalidMaxResultsException. May throw InvalidContinuationTokenException. May throw EncryptionIntegrityChecksFailedException. May throw EncryptionKeyAccessDeniedException. May throw EncryptionKeyDisabledException. May throw EncryptionKeyNotFoundException. May throw EncryptionKeyUnavailableException.
Parameter pullRequestId
:
The system-generated ID of the pull request. To get this ID, use
ListPullRequests.
Parameter actorArn
:
The Amazon Resource Name (ARN) of the user whose actions resulted in the
event. Examples include updating the pull request with more commits or
changing the status of a pull request.
Parameter maxResults
:
A non-zero, non-negative integer used to limit the number of returned
results. The default is 100 events, which is also the maximum number of
events that can be returned in a result.
Parameter nextToken
:
An enumeration token that, when provided in a request, returns the next
batch of the results.
Parameter pullRequestEventType
:
Optional. The pull request event type about which you want to return
information.
Implementation
Future<DescribePullRequestEventsOutput> describePullRequestEvents({
required String pullRequestId,
String? actorArn,
int? maxResults,
String? nextToken,
PullRequestEventType? pullRequestEventType,
}) async {
ArgumentError.checkNotNull(pullRequestId, 'pullRequestId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeCommit_20150413.DescribePullRequestEvents'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'pullRequestId': pullRequestId,
if (actorArn != null) 'actorArn': actorArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (pullRequestEventType != null)
'pullRequestEventType': pullRequestEventType.toValue(),
},
);
return DescribePullRequestEventsOutput.fromJson(jsonResponse.body);
}