class Pronto::Formatter::BitbucketPullRequestFormatter

Public Class Methods

name() click to toggle source
# File lib/pronto/formatter/bitbucket_pull_request_formatter.rb, line 4
def self.name
  'bitbucket_pr'
end

Public Instance Methods

approve_pull_request(comments_count, additions_count, client) click to toggle source
# File lib/pronto/formatter/bitbucket_pull_request_formatter.rb, line 20
def approve_pull_request(comments_count, additions_count, client)
  return if config.bitbucket_auto_approve == false

  if comments_count > 0 && additions_count > 0
    client.unapprove_pull_request
  elsif comments_count == 0
    client.approve_pull_request
  end
end
client_module() click to toggle source
# File lib/pronto/formatter/bitbucket_pull_request_formatter.rb, line 8
def client_module
  Bitbucket
end
line_number(message, _) click to toggle source
# File lib/pronto/formatter/bitbucket_pull_request_formatter.rb, line 16
def line_number(message, _)
  message.line.line.new_lineno if message.line
end
pretty_name() click to toggle source
# File lib/pronto/formatter/bitbucket_pull_request_formatter.rb, line 12
def pretty_name
  'BitBucket'
end