lib/codeowners/cli/config.rb in codeowners-checker-1.0.5 vs lib/codeowners/cli/config.rb in codeowners-checker-1.1.1

- old
+ new

@@ -6,19 +6,25 @@ module Cli # Provide options for configuring the default owner used for filtering changes. class Config < Base default_task :list - desc 'list', 'List the default owner configured in the config file' + desc 'list', 'List the default values configured in the config file' def list puts(config.to_h.map { |name, value| "#{name}: #{value.inspect}" }) - help_stderr if config.default_owner.empty? + help_stderr if config.default_owner.empty? || config.default_organization.empty? end desc 'owner <name>', 'Configure a default owner name' def owner(name) config.default_owner = name puts "Default owner configured to #{name}" + end + + desc 'organization <name>', 'Configure a default organization name' + def organization(name) + config.default_organization = name + puts "Default organization configured to #{name}" end end end end