CodeCommit / Paginator / GetCommentsForPullRequest

GetCommentsForPullRequest#

class CodeCommit.Paginator.GetCommentsForPullRequest#
paginator = client.get_paginator('get_comments_for_pull_request')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from CodeCommit.Client.get_comments_for_pull_request().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    pullRequestId='string',
    repositoryName='string',
    beforeCommitId='string',
    afterCommitId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • pullRequestId (string) –

    [REQUIRED]

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

  • repositoryName (string) – The name of the repository that contains the pull request.

  • beforeCommitId (string) – The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.

  • afterCommitId (string) – The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'commentsForPullRequestData': [
        {
            'pullRequestId': 'string',
            'repositoryName': 'string',
            'beforeCommitId': 'string',
            'afterCommitId': 'string',
            'beforeBlobId': 'string',
            'afterBlobId': 'string',
            'location': {
                'filePath': 'string',
                'filePosition': 123,
                'relativeFileVersion': 'BEFORE'|'AFTER'
            },
            'comments': [
                {
                    'commentId': 'string',
                    'content': 'string',
                    'inReplyTo': 'string',
                    'creationDate': datetime(2015, 1, 1),
                    'lastModifiedDate': datetime(2015, 1, 1),
                    'authorArn': 'string',
                    'deleted': True|False,
                    'clientRequestToken': 'string',
                    'callerReactions': [
                        'string',
                    ],
                    'reactionCounts': {
                        'string': 123
                    }
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • commentsForPullRequestData (list) –

      An array of comment objects on the pull request.

      • (dict) –

        Returns information about comments on a pull request.

        • pullRequestId (string) –

          The system-generated ID of the pull request.

        • repositoryName (string) –

          The name of the repository that contains the pull request.

        • beforeCommitId (string) –

          The full commit ID of the commit that was the tip of the destination branch when the pull request was created. This commit is superceded by the after commit in the source branch when and if you merge the source branch into the destination branch.

        • afterCommitId (string) –

          The full commit ID of the commit that was the tip of the source branch at the time the comment was made.

        • beforeBlobId (string) –

          The full blob ID of the file on which you want to comment on the destination commit.

        • afterBlobId (string) –

          The full blob ID of the file on which you want to comment on the source commit.

        • location (dict) –

          Location information about the comment on the pull request, including the file name, line number, and whether the version of the file where the comment was made is BEFORE (destination branch) or AFTER (source branch).

          • filePath (string) –

            The name of the file being compared, including its extension and subdirectory, if any.

          • filePosition (integer) –

            The position of a change in a compared file, in line number format.

          • relativeFileVersion (string) –

            In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

        • comments (list) –

          An array of comment objects. Each comment object contains information about a comment on the pull request.

          • (dict) –

            Returns information about a specific comment.

            • commentId (string) –

              The system-generated comment ID.

            • content (string) –

              The content of the comment.

            • inReplyTo (string) –

              The ID of the comment for which this comment is a reply, if any.

            • creationDate (datetime) –

              The date and time the comment was created, in timestamp format.

            • lastModifiedDate (datetime) –

              The date and time the comment was most recently modified, in timestamp format.

            • authorArn (string) –

              The Amazon Resource Name (ARN) of the person who posted the comment.

            • deleted (boolean) –

              A Boolean value indicating whether the comment has been deleted.

            • clientRequestToken (string) –

              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.

            • callerReactions (list) –

              The emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API.

              • (string) –

            • reactionCounts (dict) –

              A string to integer map that represents the number of individual users who have responded to a comment with the specified reactions.

              • (string) –

                • (integer) –

    • NextToken (string) –

      A token to resume pagination.