Class: CreateTicket::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/create_ticket/cli.rb

Instance Method Summary collapse

Instance Method Details

#confObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/create_ticket/cli.rb', line 5

def conf
  {
    jira_url: ENV.fetch('JIRA_URL'),
    project: ENV.fetch('JIRA_PROJECT'),
    jira_token: ENV.fetch('JIRA_TOKEN'),
    template_filename: ENV.fetch('TEMPLATE_FILENAME'),
    assignee: ENV.fetch('JIRA_ASSIGNEE'),
    issue_type: ENV.fetch('JIRA_ISSUE_TYPE')
  }
end

#run!Object



16
17
18
# File 'lib/create_ticket/cli.rb', line 16

def run!
  CreateTicket.new(conf).create_ticket!
end