code: def post_pr_comment(self, patch):
          
          if self.has_violations:
              post_pr_comment = True
  
              # Attempt to post a PR review. If posting the PR review fails because the bot account
              # does not have permission to review the PR then simply revert to posting a regular PR
              # comment.
              try:
                  logger.info('Deleting old PR review comments')
                  self.git_client.delete_pull_request_review_comments(self.config.pr)
  
                  logger.info('Creating PR review')
                  self.git_client.create_pull_request_review(self.config.pr, patch, self._diff_violations)
                  post_pr_comment = False
              except GitClientError as e:
                  # TODO: Make `create_pull_request_review` raise an `UnauthorizedError`
                  # so that we don't have to check for a specific message in the exception
                  if 'Viewer does not have permission to review this pull request' in str(e):
                      logger.warning("Could not post PR review (the account didn't have permission)")
                      pass
                  else:
                      raise
  
              if post_pr_comment:
                  logger.info('Deleting old PR comment')
                  self.git_client.delete_pull_request_comments(self.config.pr)
  
                  logger.info('Creating PR comment')
                  comment = build_pr_comment(self.config, self.violations)
                  self.git_client.create_pull_request_comment(self.config.pr, comment)
docs: Posts a comment to the GitHub PR if the diff results have issues.