Sha256: 8c6907cf5626ca329ceead7c53b8cc8fd4a3f846a641490336d5e3f6899a5c6f
Contents?: true
Size: 899 Bytes
Versions: 2
Compression:
Stored size: 899 Bytes
Contents
# frozen_string_literal: true require_relative 'base' module Codeowners module Cli # Provide options for configuring the default owner used for filtering changes. class Config < Base default_task :list 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? || 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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
codeowners-checker-1.1.2 | lib/codeowners/cli/config.rb |
codeowners-checker-1.1.1 | lib/codeowners/cli/config.rb |