git-pulls 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/git-pulls.rb +11 -2
- metadata +3 -3
data/lib/git-pulls.rb
CHANGED
@@ -34,12 +34,21 @@ class GitPulls
|
|
34
34
|
|
35
35
|
def merge
|
36
36
|
num = @args.shift
|
37
|
+
option = @args.shift
|
37
38
|
if p = pull_num(num)
|
38
39
|
o = p['head']['repository']['owner']
|
39
40
|
r = p['head']['repository']['name']
|
40
41
|
s = p['head']['sha']
|
41
|
-
|
42
|
-
|
42
|
+
|
43
|
+
message = "Merge pull request ##{num} from #{o}/#{r}\n\n---\n\n"
|
44
|
+
message += p['body'].gsub("'", '')
|
45
|
+
cmd = ''
|
46
|
+
if option == '--log'
|
47
|
+
message += "\n\n---\n\nMerge Log:\n"
|
48
|
+
puts cmd = "git merge --no-ff --log -m '#{message}' #{s}"
|
49
|
+
else
|
50
|
+
puts cmd = "git merge --no-ff -m '#{message}' #{s}"
|
51
|
+
end
|
43
52
|
exec(cmd)
|
44
53
|
else
|
45
54
|
puts "No such number"
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.2
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Scott Chacon
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-01-07 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|