# frozen_string_literal: true require 'thor' module Dri module Commands class Fetch < Thor namespace :fetch desc 'triaged', 'Command description...' method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information' def triaged(*) if options[:help] invoke :help, ['triaged'] else require_relative 'fetch/triaged' Dri::Commands::Fetch::Triaged.new(options).execute end end desc 'testcases', 'Display failing testcases' method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information' method_option :filter_pipelines, type: :boolean, desc: 'Filter by pipeline' def testcases(*) if options[:help] invoke :help, ['testcases'] else require_relative 'fetch/testcases' Dri::Commands::Fetch::Testcases.new(options).execute end end desc 'failures', 'Display failures opened today' method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information' method_option :urgent, type: :boolean, desc: 'Shows failures that quickly escalated' def failures(*) if options[:help] invoke :help, ['failures'] else require_relative 'fetch/failures' Dri::Commands::Fetch::Failures.new(options).execute end end end end end