lib/dri/commands/fetch.rb in dri-0.1.3 vs lib/dri/commands/fetch.rb in dri-0.2.0
- old
+ new
@@ -5,10 +5,22 @@
module Dri
module Commands
class Fetch < Thor
namespace :fetch
+ desc 'featureflags', 'Display feature flag changes for today'
+ method_option :help, aliases: '-h', type: :boolean,
+ desc: 'Display usage information'
+ def featureflags(*)
+ if options[:help]
+ invoke :help, ['featureflags']
+ else
+ require_relative 'fetch/featureflags'
+ Dri::Commands::Fetch::FeatureFlags.new(options).execute
+ end
+ end
+
desc 'triaged', 'Command description...'
method_option :help, aliases: '-h', type: :boolean,
desc: 'Display usage information'
def triaged(*)
if options[:help]
@@ -21,11 +33,11 @@
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'
+ desc: 'Filter by pipeline'
def testcases(*)
if options[:help]
invoke :help, ['testcases']
else
require_relative 'fetch/testcases'
@@ -35,11 +47,11 @@
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'
+ desc: 'Shows failures that quickly escalated'
def failures(*)
if options[:help]
invoke :help, ['failures']
else
require_relative 'fetch/failures'
@@ -47,17 +59,27 @@
end
end
desc 'quarantines', 'Display open quarantine MRs'
method_option :help, aliases: '-h', type: :boolean,
- desc: 'Display usage information'
+ desc: 'Display usage information'
def quarantines(*)
if options[:help]
invoke :help, ['quarantines']
else
require_relative 'fetch/quarantines'
- Dri::Commands::Fetch::Quarantines.new(options).execute
+ Dri::Commands::Fetch::Quarantines.new(options, search: '[QUARANTINE]').execute
end
+ end
+
+ desc 'dequarantines', 'Display open dequarantine MRs'
+ method_option :help, aliases: '-h', type: :boolean,
+ desc: 'Display usage information'
+ def dequarantines(*)
+ return invoke :help, %w[quarantines] if options[:help]
+
+ require_relative 'fetch/quarantines'
+ Dri::Commands::Fetch::Quarantines.new(options, search: '[DEQUARANTINE]').execute
end
end
end
end