git_helper 3.2.1 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +36 -13
- data/Guardfile +3 -1
- data/README.md +11 -6
- data/Rakefile +2 -0
- data/bin/git-helper +25 -13
- data/lib/git_helper.rb +6 -2
- data/lib/git_helper/change_remote.rb +13 -5
- data/lib/git_helper/checkout_default.rb +2 -0
- data/lib/git_helper/clean_branches.rb +2 -0
- data/lib/git_helper/code_request.rb +32 -19
- data/lib/git_helper/empty_commit.rb +2 -0
- data/lib/git_helper/forget_local_commits.rb +2 -0
- data/lib/git_helper/git_config_reader.rb +12 -6
- data/lib/git_helper/gitlab_client.rb +2 -0
- data/lib/git_helper/local_code.rb +18 -8
- data/lib/git_helper/merge_request.rb +90 -70
- data/lib/git_helper/new_branch.rb +3 -1
- data/lib/git_helper/octokit_client.rb +2 -0
- data/lib/git_helper/pull_request.rb +97 -66
- data/lib/git_helper/setup.rb +116 -0
- data/lib/git_helper/version.rb +3 -1
- data/spec/git_helper/change_remote_spec.rb +24 -24
- data/spec/git_helper/checkout_default_spec.rb +2 -0
- data/spec/git_helper/clean_branches_spec.rb +2 -0
- data/spec/git_helper/code_request_spec.rb +31 -28
- data/spec/git_helper/empty_commit_spec.rb +2 -0
- data/spec/git_helper/forget_local_commits_spec.rb +2 -0
- data/spec/git_helper/git_config_reader_spec.rb +32 -4
- data/spec/git_helper/gitlab_client_spec.rb +2 -0
- data/spec/git_helper/local_code_spec.rb +2 -0
- data/spec/git_helper/merge_request_spec.rb +24 -23
- data/spec/git_helper/new_branch_spec.rb +10 -8
- data/spec/git_helper/octokit_client_spec.rb +2 -0
- data/spec/git_helper/pull_request_spec.rb +20 -18
- data/spec/git_helper/setup_spec.rb +189 -0
- data/spec/spec_helper.rb +4 -1
- metadata +38 -10
- data/lib/git_helper/highline_cli.rb +0 -33
- data/spec/git_helper/highline_cli_spec.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7e2fb7b1199964740a0d73091815fb81469b492a3de04adc16aea30ba794e79
|
4
|
+
data.tar.gz: 80abd21099775a4829c1e72accb74f7f91ae6e9f5e536cfd0468879065de06ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fdabeaa00c72c8f58e00bce3f054949ad1061dbbb132661d06caf788ca827b486d44c20d57213582c2eb7b9c8db28ac88636b5e4562366010c33cc6056c526c
|
7
|
+
data.tar.gz: '08eee4e6e95562f500c93df42f72a713b43ece4d39c96013d5313612f13bf33dc4b7dcd5ca6de243d3bba360af8d8bc183d6c5f2a8600d9692de2afa3bf7c675'
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_helper (3.2
|
4
|
+
git_helper (3.3.2)
|
5
5
|
gitlab (~> 4.16)
|
6
6
|
gli (~> 2.13)
|
7
|
-
|
7
|
+
highline_wrapper (~> 0.1.0)
|
8
8
|
octokit (~> 4.18)
|
9
9
|
|
10
10
|
GEM
|
@@ -12,8 +12,9 @@ GEM
|
|
12
12
|
specs:
|
13
13
|
addressable (2.7.0)
|
14
14
|
public_suffix (>= 2.0.2, < 5.0)
|
15
|
+
ast (2.4.2)
|
15
16
|
coderay (1.1.3)
|
16
|
-
concurrent-ruby (1.1.
|
17
|
+
concurrent-ruby (1.1.8)
|
17
18
|
diff-lcs (1.4.4)
|
18
19
|
faker (2.15.1)
|
19
20
|
i18n (>= 1.6, < 2)
|
@@ -21,13 +22,13 @@ GEM
|
|
21
22
|
faraday-net_http (~> 1.0)
|
22
23
|
multipart-post (>= 1.2, < 3)
|
23
24
|
ruby2_keywords
|
24
|
-
faraday-net_http (1.0.
|
25
|
+
faraday-net_http (1.0.1)
|
25
26
|
ffi (1.14.2)
|
26
27
|
formatador (0.2.5)
|
27
28
|
gitlab (4.17.0)
|
28
29
|
httparty (~> 0.18)
|
29
30
|
terminal-table (~> 1.5, >= 1.5.1)
|
30
|
-
gli (2.
|
31
|
+
gli (2.20.0)
|
31
32
|
guard (2.16.2)
|
32
33
|
formatador (>= 0.2.4)
|
33
34
|
listen (>= 2.7, < 4.0)
|
@@ -43,10 +44,12 @@ GEM
|
|
43
44
|
guard-compat (~> 1.1)
|
44
45
|
rspec (>= 2.99.0, < 4.0)
|
45
46
|
highline (2.0.3)
|
47
|
+
highline_wrapper (0.1.0)
|
48
|
+
highline (~> 2.0)
|
46
49
|
httparty (0.18.1)
|
47
50
|
mime-types (~> 3.0)
|
48
51
|
multi_xml (>= 0.5.2)
|
49
|
-
i18n (1.8.
|
52
|
+
i18n (1.8.8)
|
50
53
|
concurrent-ruby (~> 1.0)
|
51
54
|
listen (3.4.1)
|
52
55
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
@@ -55,7 +58,7 @@ GEM
|
|
55
58
|
method_source (1.0.0)
|
56
59
|
mime-types (3.3.1)
|
57
60
|
mime-types-data (~> 3.2015)
|
58
|
-
mime-types-data (3.
|
61
|
+
mime-types-data (3.2021.0225)
|
59
62
|
multi_xml (0.6.0)
|
60
63
|
multipart-post (2.1.1)
|
61
64
|
nenv (0.3.0)
|
@@ -65,14 +68,20 @@ GEM
|
|
65
68
|
octokit (4.20.0)
|
66
69
|
faraday (>= 0.9)
|
67
70
|
sawyer (~> 0.8.0, >= 0.5.3)
|
68
|
-
|
71
|
+
parallel (1.20.1)
|
72
|
+
parser (3.0.0.0)
|
73
|
+
ast (~> 2.4.1)
|
74
|
+
pry (0.14.0)
|
69
75
|
coderay (~> 1.1)
|
70
76
|
method_source (~> 1.0)
|
71
77
|
public_suffix (4.0.6)
|
78
|
+
rainbow (3.0.0)
|
72
79
|
rake (13.0.3)
|
73
80
|
rb-fsevent (0.10.4)
|
74
81
|
rb-inotify (0.10.1)
|
75
82
|
ffi (~> 1.0)
|
83
|
+
regexp_parser (2.1.1)
|
84
|
+
rexml (3.2.4)
|
76
85
|
rspec (3.10.0)
|
77
86
|
rspec-core (~> 3.10.0)
|
78
87
|
rspec-expectations (~> 3.10.0)
|
@@ -82,18 +91,30 @@ GEM
|
|
82
91
|
rspec-expectations (3.10.1)
|
83
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
84
93
|
rspec-support (~> 3.10.0)
|
85
|
-
rspec-mocks (3.10.
|
94
|
+
rspec-mocks (3.10.2)
|
86
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
96
|
rspec-support (~> 3.10.0)
|
88
|
-
rspec-support (3.10.
|
89
|
-
|
97
|
+
rspec-support (3.10.2)
|
98
|
+
rubocop (1.10.0)
|
99
|
+
parallel (~> 1.10)
|
100
|
+
parser (>= 3.0.0.0)
|
101
|
+
rainbow (>= 2.2.2, < 4.0)
|
102
|
+
regexp_parser (>= 1.8, < 3.0)
|
103
|
+
rexml
|
104
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
105
|
+
ruby-progressbar (~> 1.7)
|
106
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
107
|
+
rubocop-ast (1.4.1)
|
108
|
+
parser (>= 2.7.1.5)
|
109
|
+
ruby-progressbar (1.11.0)
|
110
|
+
ruby2_keywords (0.0.4)
|
90
111
|
sawyer (0.8.2)
|
91
112
|
addressable (>= 2.3.5)
|
92
113
|
faraday (> 0.8, < 2.0)
|
93
114
|
shellany (0.0.1)
|
94
115
|
terminal-table (1.8.0)
|
95
116
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
96
|
-
thor (1.0
|
117
|
+
thor (1.1.0)
|
97
118
|
unicode-display_width (1.7.0)
|
98
119
|
|
99
120
|
PLATFORMS
|
@@ -104,8 +125,10 @@ DEPENDENCIES
|
|
104
125
|
faker (~> 2.15)
|
105
126
|
git_helper!
|
106
127
|
guard-rspec (~> 4.3)
|
128
|
+
pry (~> 0.13)
|
107
129
|
rake (~> 13.0)
|
108
130
|
rspec (~> 3.9)
|
131
|
+
rubocop (~> 1.10)
|
109
132
|
|
110
133
|
BUNDLED WITH
|
111
|
-
2.2.
|
134
|
+
2.2.9
|
data/Guardfile
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
guard :rspec, cmd: 'bundle exec rspec', all_on_start: true do
|
2
4
|
watch(%r{^spec/.+_spec\.rb$})
|
3
5
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
4
6
|
watch('spec/spec_helper.rb') { 'spec' }
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# git_helper [](https://github.com/emmahsax/git_helper/actions/workflows/main.yml)
|
2
2
|
|
3
3
|
## Gem Usage
|
4
4
|
|
@@ -27,6 +27,11 @@ To see what version of git_helper you're running, run:
|
|
27
27
|
git-helper --version
|
28
28
|
```
|
29
29
|
|
30
|
+
To help you create the `~/.git_helper/config.yml` file and set up the plugins (see below), run this command and allow the command to walk you through the prompts:
|
31
|
+
```bash
|
32
|
+
git-helper setup
|
33
|
+
```
|
34
|
+
|
30
35
|
## Plugin Usage
|
31
36
|
|
32
37
|
As an additional option, you can set each of the following commands to be a git plugin, meaning you can call them in a way that feels even more git-native:
|
@@ -46,7 +51,7 @@ unzip path/to/downloaded/plugins.zip -d ~/.git_helper
|
|
46
51
|
|
47
52
|
Now, the plugins will live in `~/.git_helper/plugins/*`. Add the following line to your `~/.bash_profile`:
|
48
53
|
|
49
|
-
```
|
54
|
+
```bash
|
50
55
|
export PATH=/path/to/computer/home/.git_helper/plugins:$PATH
|
51
56
|
```
|
52
57
|
|
@@ -70,7 +75,7 @@ alias gnb="git new-branch"
|
|
70
75
|
|
71
76
|
And then, running `gnb` maps to `git new-branch`, which again routes to `git-helper new-branch`.
|
72
77
|
|
73
|
-
For a full list of the git aliases I prefer to use, check out my [Git Aliases gist](https://gist.github.com/
|
78
|
+
For a full list of the git aliases I prefer to use, check out my [Git Aliases gist](https://gist.github.com/emmahsax/e8744fe253fba1f00a621c01a2bf68f5).
|
74
79
|
|
75
80
|
If you're going to make using git workflows easier, might as well provide lots of options 😃.
|
76
81
|
|
@@ -173,9 +178,9 @@ The command either accepts a branch name right away or it will ask you for the n
|
|
173
178
|
|
174
179
|
## Contributing
|
175
180
|
|
176
|
-
To submit a feature request, bug ticket, etc, please submit an official [GitHub Issue](https://github.com/
|
181
|
+
To submit a feature request, bug ticket, etc, please submit an official [GitHub Issue](https://github.com/emmahsax/git_helper/issues/new).
|
177
182
|
|
178
|
-
To report any security vulnerabilities, please view this project's [Security Policy](https://github.com/
|
183
|
+
To report any security vulnerabilities, please view this project's [Security Policy](https://github.com/emmahsax/git_helper/security/policy).
|
179
184
|
|
180
185
|
When interacting with this repository, please follow [Contributor Covenant's Code of Conduct](https://contributor-covenant.org).
|
181
186
|
|
@@ -185,7 +190,7 @@ To make a new release of this gem:
|
|
185
190
|
|
186
191
|
1. Merge the pull request via the big green button
|
187
192
|
2. Run `git tag vX.X.X` and `git push --tag`
|
188
|
-
3. Make a new release [here](https://github.com/
|
193
|
+
3. Make a new release [here](https://github.com/emmahsax/git_helper/releases/new)
|
189
194
|
4. Run `gem build *.gemspec`
|
190
195
|
5. Run `gem push *.gem` to push the new gem to RubyGems
|
191
196
|
6. Run `rm *.gem` to clean up your local repository
|
data/Rakefile
CHANGED
data/bin/git-helper
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
2
4
|
require 'rubygems'
|
3
5
|
require 'gli'
|
4
6
|
require_relative '../lib/git_helper'
|
@@ -11,46 +13,54 @@ version GitHelper::VERSION
|
|
11
13
|
autocomplete_commands false
|
12
14
|
wrap_help_text :verbatim
|
13
15
|
|
14
|
-
program_long_desc "
|
16
|
+
program_long_desc "
|
15
17
|
DOCUMENTATION
|
16
18
|
For documentation and help in setting up your Git configuration files,
|
17
|
-
see Git Helper's GitHub repo: https://github.com/
|
18
|
-
"
|
19
|
+
see Git Helper's GitHub repo: https://github.com/emmahsax/git_helper
|
20
|
+
"
|
21
|
+
|
22
|
+
desc 'Sets up Git Helper configs at ~/.git_helper/*'
|
23
|
+
command 'setup' do |c|
|
24
|
+
c.action do
|
25
|
+
GitHelper::Setup.new.execute
|
26
|
+
end
|
27
|
+
end
|
19
28
|
|
20
29
|
arg :old_owner
|
21
30
|
arg :new_owner
|
22
31
|
desc "Update a repository's remote URLs from an old GitHub owner to a new owner."
|
23
32
|
command 'change-remote' do |c|
|
24
|
-
c.action do |
|
33
|
+
c.action do |_global_options, _options, args|
|
25
34
|
raise ArgumentError, 'You must specify an old owner and a new owner' unless args.count == 2
|
35
|
+
|
26
36
|
GitHelper::ChangeRemote.new(args[0], args[1]).execute
|
27
37
|
end
|
28
38
|
end
|
29
39
|
|
30
40
|
desc 'Checks out the default branch of a repo based on the local remote branches.'
|
31
41
|
command 'checkout-default' do |c|
|
32
|
-
c.action do |
|
42
|
+
c.action do |_global_options, _options, _args|
|
33
43
|
GitHelper::CheckoutDefault.new.execute
|
34
44
|
end
|
35
45
|
end
|
36
46
|
|
37
47
|
desc "Clean a repository's git branches."
|
38
48
|
command 'clean-branches' do |c|
|
39
|
-
c.action do |
|
49
|
+
c.action do |_global_options, _options, _args|
|
40
50
|
GitHelper::CleanBranches.new.execute
|
41
51
|
end
|
42
52
|
end
|
43
53
|
|
44
54
|
desc 'Creates an empty commit with a basic commit message.'
|
45
55
|
command 'empty-commit' do |c|
|
46
|
-
c.action do |
|
56
|
+
c.action do |_global_options, _options, _args|
|
47
57
|
GitHelper::EmptyCommit.new.execute
|
48
58
|
end
|
49
59
|
end
|
50
60
|
|
51
61
|
desc 'Reset your local git commits to origin/HEAD.'
|
52
62
|
command 'forget-local-commits' do |c|
|
53
|
-
c.action do |
|
63
|
+
c.action do |_global_options, _options, _args|
|
54
64
|
GitHelper::ForgetLocalCommits.new.execute
|
55
65
|
end
|
56
66
|
end
|
@@ -58,21 +68,23 @@ end
|
|
58
68
|
arg :new_branch_name, optional: true
|
59
69
|
desc 'Create a new branch for features, bug fixes, or experimentation.'
|
60
70
|
command 'new-branch' do |c|
|
61
|
-
c.action do |
|
71
|
+
c.action do |_global_options, _options, args|
|
62
72
|
GitHelper::NewBranch.new.execute(args[0])
|
63
73
|
end
|
64
74
|
end
|
65
75
|
|
66
|
-
desc 'Merge a GitHub/GitLab pull/merge request. The command will figure out whether your
|
76
|
+
desc 'Merge a GitHub/GitLab pull/merge request. The command will figure out whether your ' \
|
77
|
+
'code project belongs to GitHub or GitLab.'
|
67
78
|
command 'merge-code-request' do |c|
|
68
|
-
c.action do |
|
79
|
+
c.action do |_global_options, _options, _args|
|
69
80
|
GitHelper::CodeRequest.new.merge
|
70
81
|
end
|
71
82
|
end
|
72
83
|
|
73
|
-
desc 'Create a GitHub/GitLab pull/merge request from the current branch. The command will figure
|
84
|
+
desc 'Create a GitHub/GitLab pull/merge request from the current branch. The command will figure ' \
|
85
|
+
'out whether your code project belongs to GitHub or GitLab.'
|
74
86
|
command 'code-request' do |c|
|
75
|
-
c.action do |
|
87
|
+
c.action do |_global_options, _options, _args|
|
76
88
|
GitHelper::CodeRequest.new.create
|
77
89
|
end
|
78
90
|
end
|
data/lib/git_helper.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
2
4
|
require 'gitlab'
|
3
|
-
require '
|
5
|
+
require 'highline_wrapper'
|
4
6
|
require 'octokit'
|
5
7
|
|
6
|
-
|
8
|
+
files = "#{File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), 'git_helper'))}/**/*.rb"
|
9
|
+
|
10
|
+
Dir[files].each do |file|
|
7
11
|
require_relative file
|
8
12
|
end
|
9
13
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module GitHelper
|
2
4
|
class ChangeRemote
|
3
5
|
attr_accessor :old_owner, :new_owner
|
@@ -11,7 +13,7 @@ module GitHelper
|
|
11
13
|
original_dir = Dir.pwd
|
12
14
|
nested_dirs = Dir.entries(original_dir).select do |entry|
|
13
15
|
entry_dir = File.join(original_dir, entry)
|
14
|
-
File.directory?(entry_dir) && !
|
16
|
+
File.directory?(entry_dir) && !['.', '..'].include?(entry)
|
15
17
|
end
|
16
18
|
|
17
19
|
nested_dirs.each do |nested_dir|
|
@@ -22,8 +24,10 @@ module GitHelper
|
|
22
24
|
private def process_dir(current_dir, original_dir)
|
23
25
|
Dir.chdir(current_dir)
|
24
26
|
|
25
|
-
if File.exist?('.git')
|
26
|
-
|
27
|
+
if File.exist?('.git') && highline.ask_yes_no(
|
28
|
+
"Found git directory: #{current_dir}. Do you wish to proceed in updating #{current_dir}'s remote URLs? (y/n)"
|
29
|
+
)
|
30
|
+
process_git_repository
|
27
31
|
end
|
28
32
|
|
29
33
|
Dir.chdir(original_dir)
|
@@ -40,6 +44,8 @@ module GitHelper
|
|
40
44
|
puts "\n"
|
41
45
|
end
|
42
46
|
|
47
|
+
# rubocop:disable Metrics/AbcSize
|
48
|
+
# rubocop:disable Metrics/MethodLength
|
43
49
|
private def process_remote(remote)
|
44
50
|
remote_name = local_code.remote_name(remote)
|
45
51
|
|
@@ -56,13 +62,15 @@ module GitHelper
|
|
56
62
|
puts " Changing the remote URL #{remote_name} to be '#{remote_url}'."
|
57
63
|
local_code.change_remote(remote_name, remote_url)
|
58
64
|
end
|
65
|
+
# rubocop:enable Metrics/MethodLength
|
66
|
+
# rubocop:enable Metrics/AbcSize
|
59
67
|
|
60
68
|
private def local_code
|
61
69
|
@local_code ||= GitHelper::LocalCode.new
|
62
70
|
end
|
63
71
|
|
64
|
-
private def
|
65
|
-
@
|
72
|
+
private def highline
|
73
|
+
@highline ||= HighlineWrapper.new
|
66
74
|
end
|
67
75
|
end
|
68
76
|
end
|
@@ -1,10 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module GitHelper
|
2
4
|
class CodeRequest
|
3
5
|
def create
|
4
|
-
process_project.create(
|
5
|
-
|
6
|
-
|
7
|
-
|
6
|
+
process_project.create(
|
7
|
+
{
|
8
|
+
base_branch: base_branch,
|
9
|
+
new_title: new_code_request_title
|
10
|
+
}
|
11
|
+
)
|
8
12
|
end
|
9
13
|
|
10
14
|
def merge
|
@@ -23,8 +27,13 @@ module GitHelper
|
|
23
27
|
end
|
24
28
|
end
|
25
29
|
|
30
|
+
# rubocop:disable Metrics/MethodLength
|
26
31
|
private def ask_for_clarification
|
27
|
-
resp =
|
32
|
+
resp = highline.ask(
|
33
|
+
'Found git remotes for both GitHub and GitLab. Would you like to proceed ' \
|
34
|
+
'with GitLab or GitHub? (github/gitlab)'
|
35
|
+
).downcase
|
36
|
+
|
28
37
|
if resp.include?('hub')
|
29
38
|
github_pull_request
|
30
39
|
elsif resp.include?('lab')
|
@@ -34,6 +43,7 @@ module GitHelper
|
|
34
43
|
exit
|
35
44
|
end
|
36
45
|
end
|
46
|
+
# rubocop:enable Metrics/MethodLength
|
37
47
|
|
38
48
|
private def github_pull_request
|
39
49
|
@github_pull_request ||= GitHelper::GitHubPullRequest.new(options)
|
@@ -48,7 +58,7 @@ module GitHelper
|
|
48
58
|
local_project: local_project,
|
49
59
|
local_branch: local_branch,
|
50
60
|
local_code: local_code,
|
51
|
-
|
61
|
+
highline: highline
|
52
62
|
}
|
53
63
|
end
|
54
64
|
|
@@ -61,11 +71,12 @@ module GitHelper
|
|
61
71
|
end
|
62
72
|
|
63
73
|
private def base_branch
|
64
|
-
@base_branch ||=
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
74
|
+
@base_branch ||=
|
75
|
+
if highline.ask_yes_no("Is '#{default_branch}' the correct base branch for your new code request? (y/n)")
|
76
|
+
default_branch
|
77
|
+
else
|
78
|
+
highline.ask('Base branch?')
|
79
|
+
end
|
69
80
|
end
|
70
81
|
|
71
82
|
private def local_branch
|
@@ -77,16 +88,18 @@ module GitHelper
|
|
77
88
|
end
|
78
89
|
|
79
90
|
private def new_code_request_title
|
80
|
-
@new_code_request_title ||=
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
91
|
+
@new_code_request_title ||=
|
92
|
+
if autogenerated_title && highline.ask_yes_no(
|
93
|
+
"Accept the autogenerated code request title '#{autogenerated_title}'? (y/n)"
|
94
|
+
)
|
95
|
+
autogenerated_title
|
96
|
+
else
|
97
|
+
highline.ask('Title?')
|
98
|
+
end
|
86
99
|
end
|
87
100
|
|
88
|
-
private def
|
89
|
-
@
|
101
|
+
private def highline
|
102
|
+
@highline ||= HighlineWrapper.new
|
90
103
|
end
|
91
104
|
|
92
105
|
private def local_code
|