Method: Jigit::StopIssueRunner#run

Defined in:
lib/jigit/commands/stop_issue.rb

#runObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/jigit/commands/stop_issue.rb', line 10

def run
  self
  begin
    jira_issue = @jira_api_client.fetch_jira_issue(@issue_name)
    return unless issue_exists?(jira_issue)
    new_status = ask_for_new_status_for_issue
    put_issue_to_status(jira_issue, new_status)
  rescue Jigit::JiraInvalidIssueKeyError
    ui.say "#{@issue_name} doesn't exist on JIRA, skipping..."
  rescue Jigit::NetworkError => exception
    ui.error "Error while executing issue stop command: #{exception.message}"
  rescue Jigit::JiraAPIClientError => exception
    ui.error "Error while executing issue stop command: #{exception.message}"
  end
end