Class: Pronto::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/pronto/client.rb

Direct Known Subclasses

Bitbucket, Github, Gitlab

Instance Method Summary collapse

Constructor Details

#initialize(repo) ⇒ Client

Returns a new instance of Client.



3
4
5
6
7
8
# File 'lib/pronto/client.rb', line 3

def initialize(repo)
  @repo = repo
  @config = Config.new
  @comment_cache = {}
  @pull_id_cache = {}
end

Instance Method Details

#env_pull_idObject



10
11
12
13
14
15
16
17
# File 'lib/pronto/client.rb', line 10

def env_pull_id
  if (pull_request = ENV['PULL_REQUEST_ID'])
    warn "[DEPRECATION] `PULL_REQUEST_ID` is deprecated.  Please use `PRONTO_PULL_REQUEST_ID` instead."
  end

  pull_request ||= ENV['PRONTO_PULL_REQUEST_ID']
  pull_request.to_i if pull_request
end