<commit_before>module Saddler
  module Reporter
    module Github
      class PullRequestReviewComment
        def initialize(output)
          @output = output
        end

        # https://developer.github.com/v3/pulls/comments/#create-a-comment
        def report(_messages, _options)
        end
      end
    end
  end
end<commit_msg>feat(pullrequestreview): add outline<commit_after>module Saddler
  module Reporter
    module Github
      class PullRequestReviewComment
        include Support
        include Helper

        # https://developer.github.com/v3/pulls/comments/#create-a-comment
        def report(messages, _options)
          repo_path = '.'
          repo = GitRepository.new(repo_path)

          data = parse(messages)
          client = Client.new(repo)
          # fetch pull_request_review_comments
          pull_request_review_comments = client.pull_request_review_comments

          patches = client.pull_request_patches

          # build comment
          comments = build_comments(data, patches)
          return if comments.empty?

          posting_comments = comments - pull_request_review_comments
          return if posting_comments.empty?

          # create pull_request_review_comments
          posting_comments.each do |posting|
            client.create_pull_request_review_comment(posting)
          end
        end

        def build_comments(data, patches)
          []
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06023271731690623, 'fraction_numerical': 0.0013689253935660506, 'mean_word_length': 2.1576673866090714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3519714', 'n_tokens_mistral': 388, 'n_tokens_neox': 378, 'n_words': 82}