class Pronto::Formatter::GitlabMergeRequestReviewFormatter
Public Class Methods
Source
# File lib/pronto/formatter/gitlab_merge_request_review_formatter.rb, line 4 def self.name 'gitlab_mr' end
Public Instance Methods
Source
# File lib/pronto/formatter/gitlab_merge_request_review_formatter.rb, line 8 def client_module Gitlab end
Source
# File lib/pronto/formatter/gitlab_merge_request_review_formatter.rb, line 16 def existing_comments(_, client, repo) sha = repo.head_commit_sha comments = client.pull_comments(sha) grouped_comments(comments) end
Source
# File lib/pronto/formatter/gitlab_merge_request_review_formatter.rb, line 28 def line_number(message, _) message.line.line.new_lineno if message.line end
Source
# File lib/pronto/formatter/gitlab_merge_request_review_formatter.rb, line 12 def pretty_name 'Gitlab' end
Source
# File lib/pronto/formatter/gitlab_merge_request_review_formatter.rb, line 22 def submit_comments(client, comments) client.create_pull_request_review(comments) rescue => e $stderr.puts "Failed to post: #{e.message}" end