Sha256: e2317ffbfd2fe32104312b2c35e8d3f7b188591156be68cbc6b48b944e872c5a

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

module Pronto
  module Formatter
    class PullRequestFormatter < GitFormatter
      def existing_comments(client, sha)
        comments = client.pull_comments(sha)
        grouped_comments(comments)
      end

      def line_number(message)
        message.line.line.new_lineno
      end

      def submit_comments(client, comments)
        comments.each { |comment| client.create_pull_comment(comment) }
      rescue Octokit::UnprocessableEntity, HTTParty::Error => e
        $stderr.puts "Failed to post: #{e.message}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pronto-0.7.0 lib/pronto/formatter/pull_request_formatter.rb