:doc:`CodeCommit <../../codecommit>` / Client / get_comments_for_compared_commit

********************************
get_comments_for_compared_commit
********************************



.. py:method:: CodeCommit.Client.get_comments_for_compared_commit(**kwargs)

  

  Returns information about comments made on the comparison between two commits.

   

  .. note::

    

    Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetCommentsForComparedCommit>`_  


  **Request Syntax**
  ::

    response = client.get_comments_for_compared_commit(
        repositoryName='string',
        beforeCommitId='string',
        afterCommitId='string',
        nextToken='string',
        maxResults=123
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository where you want to compare commits.

    

  
  :type beforeCommitId: string
  :param beforeCommitId: 

    To establish the directionality of the comparison, the full commit ID of the before commit.

    

  
  :type afterCommitId: string
  :param afterCommitId: **[REQUIRED]** 

    To establish the directionality of the comparison, the full commit ID of the after commit.

    

  
  :type nextToken: string
  :param nextToken: 

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

    

  
  :type maxResults: integer
  :param maxResults: 

    A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments, but you can configure up to 500.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'commentsForComparedCommitData': [
              {
                  '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) --* 
      

      - **commentsForComparedCommitData** *(list) --* 

        A list of comment objects on the compared commit.

        
        

        - *(dict) --* 

          Returns information about comments on the comparison between two commits.

          
          

          - **repositoryName** *(string) --* 

            The name of the repository that contains the compared commits.

            
          

          - **beforeCommitId** *(string) --* 

            The full commit ID of the commit used to establish the before of the comparison.

            
          

          - **afterCommitId** *(string) --* 

            The full commit ID of the commit used to establish the after of the comparison.

            
          

          - **beforeBlobId** *(string) --* 

            The full blob ID of the commit used to establish the before of the comparison.

            
          

          - **afterBlobId** *(string) --* 

            The full blob ID of the commit used to establish the after of the comparison.

            
          

          - **location** *(dict) --* 

            Location information about the comment on the comparison, including the file name, line number, and whether the version of the file where the comment was made is BEFORE or AFTER.

            
            

            - **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 comparison between commits.

            
            

            - *(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) --* 

        An enumeration token that can be used in a request to return the next batch of the results.

        
  
  **Exceptions**
  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRepositoryNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitIdRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidCommitIdException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidMaxResultsException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidContinuationTokenException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  