Class: MasterToMain::CLI
- Inherits:
-
Thor
- Object
- Thor
- MasterToMain::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/master_to_main/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
8 9 10 |
# File 'lib/master_to_main/cli.rb', line 8 def self.exit_on_failure? true end |
Instance Method Details
#find_references ⇒ Object
36 37 38 39 |
# File 'lib/master_to_main/cli.rb', line 36 def find_references prompt_info _find_references end |
#update ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/master_to_main/cli.rb', line 13 def update prompt_info create_client ensure_old_branch_exists ensure_new_branch_exists clone_branch_protections change_default_branch rebase_pull_requests change_origin delete_local_old_branch ask_update_docs ask_find_references end |
#update_docs ⇒ Object
29 30 31 32 33 |
# File 'lib/master_to_main/cli.rb', line 29 def update_docs prompt_info _update_docs ask_find_references end |
#update_local ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/master_to_main/cli.rb', line 42 def update_local prompt_info `git checkout #{@repo.old_branch}` `git branch -m #{@repo.old_branch} #{@repo.new_branch}` `git fetch` `git branch --unset-upstream` `git branch -u origin/#{@repo.new_branch}` `git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/#{@repo.new_branch}` `git pull` end |