mergeComments

    Signature

    HelpercommentHelper
    Signature
    mergeComments(IHubIssue issue, IHubIssue replica)
    Description


    Add all the new comments of the replica to the issue comments and prepend the author name to them.

    Remove all the removed comments of the replica from the issue comments.

    Edit all the existing issue comments that have been changed on the replica and prepend the author name to them.

    Introduced in0.10


    Example use

    This method is merging the issue comments and replica comments so that all added replica comments are added to the issue comments, all deleted replica comments are removed from the issue comments and the comments which have been updated on the replica are updated on the issue using a comment format.

    <comment.author.displayName>  commented: 
    <comment.body> 
     issue.comments = commentHelper.mergeComments(issue, replica)


    Comments

    The helper method is provided to simplify the synchronization of comments so that the local issue comments represent the complete comment history, highlighting the remote comments by formatting the content.