Method create!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
def create!(**options)
options[:validate] = true if options[:validate].nil?
return false if options[:validate] && !git_condition_valid?
git.push(github_token_url, topic_branch)
Method execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def execute(command)
puts "$ #{command}" if verbose
`#{command}`.chomp.tap do |result|
color = $CHILD_STATUS.success? ? :green : :red
puts Rainbow(result).color(color) if verbose
Method commit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def commit(message, &block)
git.checkout_with(topic_branch) unless git.current_branch?(topic_branch)
result = modify_files(&block) if block_given?
git.add('.')
git.commit(message)