Method: Gitlab::CLI.start

Defined in:
lib/gitlab/cli.rb

.start(args) ⇒ Object

Starts a new CLI session.

Examples:

Gitlab::CLI.start(['help'])
Gitlab::CLI.start(['help', 'issues'])

Parameters:

  • args (Array)

    The command and it’s optional arguments.



18
19
20
21
22
23
24
25
26
# File 'lib/gitlab/cli.rb', line 18

def self.start(args)
  args_dup = args.dup
  command = begin
    args_dup.shift.strip
  rescue StandardError
    'help'
  end
  run(command, args_dup)
end