Class: CiToolkit::GitlabBot

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_toolkit/gitlab_bot.rb

Overview

Utility class that provides an instance of a Gitlab Client

Defined Under Namespace

Classes: Credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials = CiToolkit::GitlabBot::Credentials.new, client = Gitlab.client(endpoint: credentials.endpoint, private_token: credentials.project_access_token)) ⇒ GitlabBot

Returns a new instance of GitlabBot.



23
24
25
26
27
28
# File 'lib/ci_toolkit/gitlab_bot.rb', line 23

def initialize(
  credentials = CiToolkit::GitlabBot::Credentials.new,
  client = Gitlab.client(endpoint: credentials.endpoint, private_token: credentials.project_access_token)
)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



8
9
10
# File 'lib/ci_toolkit/gitlab_bot.rb', line 8

def client
  @client
end