Skip to content

describe_pull_request_events

describe_pull_request_events(
    pull_request_id: PullRequestId,
    *,
    config_overrides: Optional[CodeCommitClientConfig] = None,
    pull_request_event_type: Optional[PullRequestEventType] = None,
    actor_arn: Optional[Arn] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribePullRequestEventsOutput

Returns information about one or more pull request events.

Parameters:

  • pull_request_id (PullRequestId) –

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • pull_request_event_type (Optional[PullRequestEventType], default: None ) –

    Optional. The pull request event type about which you want to return information.

  • actor_arn (Optional[Arn], default: None ) –

    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.

  • next_token (Optional[NextToken], default: None ) –

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • max_results (Optional[MaxResults], default: None ) –

    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.

Raises:

Source code in docs_src/capo_codecommit/_services/code_commit.py
def describe_pull_request_events(
    self,
    pull_request_id: "capo_codecommit.types.pull_request_id.PullRequestId",
    *,
    config_overrides: Optional[CodeCommitClientConfig] = None,
    pull_request_event_type: Optional[
        "capo_codecommit.types.pull_request_event_type.PullRequestEventType"
    ] = None,
    actor_arn: Optional["capo_codecommit.types.arn.Arn"] = None,
    next_token: Optional["capo_codecommit.types.next_token.NextToken"] = None,
    max_results: Optional["capo_codecommit.types.max_results.MaxResults"] = None,
) -> "capo_codecommit.types.describe_pull_request_events_output.DescribePullRequestEventsOutput":
    """<p>Returns information about one or more pull request events.</p>

    Args:
        pull_request_id: <p>The system-generated ID of the pull request. To get this ID, use <a>ListPullRequests</a>.</p>
        pull_request_event_type: <p>Optional. The pull request event type about which you want to return information.</p>
        actor_arn: <p>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.</p>
        next_token: <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
        max_results: <p>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.</p>

    Raises:
        capo_codecommit.errors.actor_does_not_exist_exception.ActorDoesNotExistException: <p>The specified Amazon Resource Name (ARN) does not exist in the Amazon Web Services account.</p>
        capo_codecommit.errors.encryption_integrity_checks_failed_exception.EncryptionIntegrityChecksFailedException: <p>An encryption integrity check failed.</p>
        capo_codecommit.errors.encryption_key_access_denied_exception.EncryptionKeyAccessDeniedException: <p>An encryption key could not be accessed.</p>
        capo_codecommit.errors.encryption_key_disabled_exception.EncryptionKeyDisabledException: <p>The encryption key is disabled.</p>
        capo_codecommit.errors.encryption_key_not_found_exception.EncryptionKeyNotFoundException: <p>No encryption key was found.</p>
        capo_codecommit.errors.encryption_key_unavailable_exception.EncryptionKeyUnavailableException: <p>The encryption key is not available.</p>
        capo_codecommit.errors.invalid_actor_arn_exception.InvalidActorArnException: <p>The Amazon Resource Name (ARN) is not valid. Make sure that you have provided the full ARN for the user who initiated the change for the pull request, and then try again.</p>
        capo_codecommit.errors.invalid_continuation_token_exception.InvalidContinuationTokenException: <p>The specified continuation token is not valid.</p>
        capo_codecommit.errors.invalid_max_results_exception.InvalidMaxResultsException: <p>The specified number of maximum results is not valid.</p>
        capo_codecommit.errors.invalid_pull_request_event_type_exception.InvalidPullRequestEventTypeException: <p>The pull request event type is not valid. </p>
        capo_codecommit.errors.invalid_pull_request_id_exception.InvalidPullRequestIdException: <p>The pull request ID is not valid. Make sure that you have provided the full ID and that the pull request is in the specified repository, and then try again.</p>
        capo_codecommit.errors.pull_request_does_not_exist_exception.PullRequestDoesNotExistException: <p>The pull request ID could not be found. Make sure that you have specified the correct repository name and pull request ID, and then try again.</p>
        capo_codecommit.errors.pull_request_id_required_exception.PullRequestIdRequiredException: <p>A pull request ID is required, but none was provided.</p>
        capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codecommit.types.describe_pull_request_events_input.DescribePullRequestEventsInput]",
    ) -> OperationResponse[
        "capo_codecommit.types.describe_pull_request_events_output.DescribePullRequestEventsOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.describe_pull_request_events

        output, http_response = (
            capo_codecommit._operations.code_commit_20150413.describe_pull_request_events.describe_pull_request_events(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePullRequestEvents")
    )
    input_: capo_codecommit.types.describe_pull_request_events_input.DescribePullRequestEventsInput = {
        "pull_request_id": pull_request_id
    }
    if pull_request_event_type is not None:
        input_["pull_request_event_type"] = pull_request_event_type
    if actor_arn is not None:
        input_["actor_arn"] = actor_arn
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output