module Codeowners::Cli::Warner

Checks and prints deprecation warnings.

Public Class Methods

check_warnings() click to toggle source
# File lib/codeowners/cli/warner.rb, line 8
def check_warnings
  check_github_env
end
warn(msg) click to toggle source
# File lib/codeowners/cli/warner.rb, line 12
def warn(msg)
  puts "[WARNING] #{msg}"
end

Protected Class Methods

check_github_env() click to toggle source
# File lib/codeowners/cli/warner.rb, line 18
def check_github_env
  return if ENV['GITHUB_ORGANIZATION'].nil? || ENV['GITHUB_ORGANIZATION'].empty?

  warn 'Usage of GITHUB_ORGANIZATION ENV variable has been deprecated.'\
    'Run `codeowners-checker config organization #{organization}` instead.'
end