git_reflow 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.rdoc +21 -12
- data/lib/git_reflow/commands/review.rb +27 -8
- data/lib/git_reflow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0120e898073e422bc4c2203dadfb71f60de083b
|
4
|
+
data.tar.gz: bf8b82ecaccfe531f2ef87d9882ac794597352e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4647f117605853e151a65147b5ffffdcfee3a5abcf66e699fe0c6512d847da0d3ec2df0a96f48927395362227d933b52a926dc17e6abc52c023d9b671a005721
|
7
|
+
data.tar.gz: 5b6724e334fc187b4c1d6dc7ccd76b7e3db4155955644f46f24df5932872e7e78b6e44061c9e95e40a6be91c6c7a80bccfc8d22069d5ec4d5d54bb5a037aa212
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git_reflow (0.
|
4
|
+
git_reflow (0.6.0)
|
5
5
|
colorize (= 0.6.0)
|
6
6
|
github_api (= 0.12.3)
|
7
7
|
gli (= 2.12.2)
|
@@ -43,10 +43,10 @@ GEM
|
|
43
43
|
oauth2
|
44
44
|
gli (2.12.2)
|
45
45
|
hashie (3.4.1)
|
46
|
-
highline (1.7.
|
46
|
+
highline (1.7.2)
|
47
47
|
httpclient (2.6.0.1)
|
48
48
|
json_pure (1.8.2)
|
49
|
-
jwt (1.
|
49
|
+
jwt (1.5.0)
|
50
50
|
method_source (0.8.2)
|
51
51
|
mini_portile (0.6.2)
|
52
52
|
multi_json (1.11.0)
|
@@ -67,7 +67,7 @@ GEM
|
|
67
67
|
pry-byebug (3.1.0)
|
68
68
|
byebug (~> 4.0)
|
69
69
|
pry (~> 0.10)
|
70
|
-
rack (1.6.
|
70
|
+
rack (1.6.1)
|
71
71
|
rake (10.4.2)
|
72
72
|
rb-readline (0.5.2)
|
73
73
|
rdoc (4.2.0)
|
data/README.rdoc
CHANGED
@@ -108,26 +108,35 @@ We assume you know what you're doing, so if you need something different, do it
|
|
108
108
|
|
109
109
|
After making commits to your branch, run +review+. Didn't push it up? We don't care, we'll do it for you.
|
110
110
|
|
111
|
-
|
111
|
+
If you do not pass the title or message options to the review command, you will be given an editor to write your PR request in, similar to `git commit`. The first line is the title, the rest is the body.
|
112
112
|
|
113
|
-
|
113
|
+
$ git reflow review
|
114
|
+
|
115
|
+
Review your PR:
|
116
|
+
--------
|
117
|
+
Title:
|
118
|
+
rj_209_test
|
119
|
+
|
120
|
+
Body:
|
121
|
+
[lib] updates review command to address issues
|
122
|
+
--------
|
123
|
+
Submit pull request? (Y): <enter>
|
124
|
+
git fetch origin master
|
125
|
+
From github.com:meesterdude/gitreflow
|
114
126
|
* branch master -> FETCH_HEAD
|
115
|
-
Counting objects: 5, done.
|
116
|
-
Delta compression using up to 16 threads.
|
117
|
-
Compressing objects: 100% (3/3), done.
|
118
|
-
Writing objects: 100% (3/3), 1.68 KiB, done.
|
119
|
-
Total 3 (delta 1), reused 0 (delta 0)
|
120
|
-
To git@github.com:reenhanced/gitreflow.git
|
121
|
-
c2ec1b1..1103006 nh-readme-update -> nh-readme-update
|
122
127
|
|
123
|
-
|
124
|
-
|
128
|
+
git push origin rj_test
|
129
|
+
Everything up-to-date
|
130
|
+
|
131
|
+
Successfully created pull request #6: rj_test
|
132
|
+
Pull Request URL: https://github.com/meesterdude/gitreflow/pull/6
|
125
133
|
Would you like to open it in your browser? y
|
126
134
|
|
135
|
+
|
127
136
|
[OSX/Ubuntu only] You can automatically open your default web browser to the pull request.
|
128
137
|
This lets you edit the pull request with all of the detailed information you'll need before submitting it to your team.
|
129
138
|
|
130
|
-
We output the pull request URL so you can distribute it to your team without leaving the terminal.
|
139
|
+
We output the pull request URL so you can distribute it to your team without leaving the terminal.
|
131
140
|
|
132
141
|
==== How it works
|
133
142
|
Behind the scenes, this is how +review+ works:
|
@@ -6,15 +6,34 @@ command :review do |c|
|
|
6
6
|
c.flag [:t, :title], default_value: 'last commit message'
|
7
7
|
c.flag [:m, :message], default_value: 'title'
|
8
8
|
c.action do |global_options,options,args|
|
9
|
-
|
10
|
-
|
11
|
-
'title' => global_options[:title],
|
12
|
-
'body' => global_options[:message]
|
13
|
-
}
|
9
|
+
git_root_dir = run('git rev-parse --show-toplevel').strip
|
10
|
+
pull_request_msg_file = "#{git_root_dir}/.git/GIT_REFLOW_PR_MSG"
|
14
11
|
|
15
|
-
|
16
|
-
|
12
|
+
if global_options[:title] || global_options[:message]
|
13
|
+
review_options = {
|
14
|
+
'base' => args[0],
|
15
|
+
'title' => (global_options[:title] || GitReflow.current_branch),
|
16
|
+
'body' => global_options[:message]
|
17
|
+
}
|
18
|
+
else
|
19
|
+
File.open(pull_request_msg_file, 'w') do |file|
|
20
|
+
file.write(GitReflow.current_branch)
|
21
|
+
end
|
22
|
+
GitReflow.run("$EDITOR #{pull_request_msg_file}", with_system: true)
|
23
|
+
pr_msg = File.open(pull_request_msg_file).each_line.map(&:strip).to_a
|
24
|
+
File.delete(pull_request_msg_file)
|
25
|
+
title = pr_msg.shift
|
26
|
+
unless pr_msg.empty?
|
27
|
+
pr_msg.shift if pr_msg.first.empty?
|
28
|
+
end
|
29
|
+
review_options = {'base' => args[0],'title' => title,'body' => pr_msg.join("\n")}
|
30
|
+
end
|
17
31
|
|
18
|
-
|
32
|
+
puts "\nReview your PR:\n"
|
33
|
+
puts "--------\n"
|
34
|
+
puts "Title:\n#{review_options['title']}\n\n"
|
35
|
+
puts "Body:\n#{review_options['body']}\n"
|
36
|
+
puts "--------\n"
|
37
|
+
GitReflow.review(review_options) unless ask("Submit pull request? (Y)") =~ /n/i
|
19
38
|
end
|
20
39
|
end
|
data/lib/git_reflow/version.rb
CHANGED