Sha256: 475fa85daaaeb814d0436dbcc25b62e287920c9fcfeb7ab3b1bb121ff3d88fe5

Contents?: true

Size: 589 Bytes

Versions: 7

Compression:

Stored size: 589 Bytes

Contents

module Pronto
  module Formatter
    class GithubPullRequestReviewFormatter < PullRequestFormatter
      def client_module
        Github
      end

      def pretty_name
        'GitHub'
      end

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

      def line_number(message, patches)
        line = patches.find_line(message.full_path, message.line.new_lineno)
        line.position
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pronto-0.10.0 lib/pronto/formatter/github_pull_request_review_formatter.rb
pronto-0.9.5 lib/pronto/formatter/github_pull_request_review_formatter.rb
pronto-0.9.4 lib/pronto/formatter/github_pull_request_review_formatter.rb
pronto-0.9.3 lib/pronto/formatter/github_pull_request_review_formatter.rb
pronto-0.9.2 lib/pronto/formatter/github_pull_request_review_formatter.rb
pronto-0.9.1 lib/pronto/formatter/github_pull_request_review_formatter.rb
pronto-0.9.0 lib/pronto/formatter/github_pull_request_review_formatter.rb