Sha256: c52c9ce13aaad038aeea4890d33c1e6c99b99c391f8252e0089662da8cda1f83
Contents?: true
Size: 1.31 KB
Versions: 20
Compression:
Stored size: 1.31 KB
Contents
# frozen_string_literal: true require "thor" require_relative "base" module Neetob class CLI module Github module MakePr class ComplianceFix < Base attr_accessor :apps, :sandbox def initialize(apps, sandbox = false) super() @apps = apps @sandbox = sandbox end def run matching_apps = find_all_matching_apps(apps, :github, sandbox) delete_and_create_temp_neetob_dir matching_apps.each do |app| ui.info("\n Working on #{app} \n") begin clone_app_in_tmp_dir(app) check_and_delete_remote_branch(app) bundle_install(app) ui.info(add_commmit_and_push_changes(app)) delete_local_feature_branch(app) res = client.create_pull_request(app, "main", BRANCH_NAME, PR_TITLE) ui.success("PR created in \"#{app}\" project successfully.") rescue StandardError => e ExceptionHandler.new(e).process end end `rm -rf /tmp/neetob` end private def bundle_install(app) `#{cd_to_app_in_tmp_dir(app)} && bundle` end end end end end end
Version data entries
20 entries across 20 versions & 2 rubygems