gitcycle 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/gitcycle.gemspec +1 -1
- data/lib/gitcycle.rb +29 -11
- metadata +3 -3
data/README.md
CHANGED
@@ -126,7 +126,7 @@ Checkout the branch that you will eventually merge your feature into:
|
|
126
126
|
|
127
127
|
gitc checkout master
|
128
128
|
|
129
|
-
Type `gitc
|
129
|
+
Type `gitc redo` + your ticket URL to reset the branch:
|
130
130
|
|
131
131
|
gitc redo https://xxx.lighthouseapp.com/projects/0000/tickets/0000-my-ticket
|
132
132
|
|
data/gitcycle.gemspec
CHANGED
data/lib/gitcycle.rb
CHANGED
@@ -75,19 +75,33 @@ class Gitcycle
|
|
75
75
|
end
|
76
76
|
alias :co :checkout
|
77
77
|
|
78
|
-
def
|
79
|
-
|
80
|
-
'branch[name]' => branches(:current => true),
|
81
|
-
'create' => 0
|
82
|
-
)
|
78
|
+
def commit(*args)
|
79
|
+
msg = nil
|
83
80
|
|
84
|
-
if
|
85
|
-
|
81
|
+
if args.empty?
|
82
|
+
puts "\nRetrieving branch information from gitcycle.\n".green
|
83
|
+
branch = get('branch',
|
84
|
+
'branch[name]' => branches(:current => true),
|
85
|
+
'create' => 0
|
86
|
+
)
|
87
|
+
|
88
|
+
id = branch["lighthouse_url"].match(/tickets\/(\d+)/)[1] rescue nil
|
89
|
+
title = branch["title"]
|
90
|
+
|
91
|
+
if branch && id
|
92
|
+
msg = "[#{id}]"
|
93
|
+
msg += " #{title}" if title
|
94
|
+
end
|
86
95
|
end
|
87
96
|
|
88
|
-
|
97
|
+
if msg
|
98
|
+
run("git add . -u && git commit -am #{msg.dump}")
|
99
|
+
Kernel.exec("git commit --amend")
|
100
|
+
else
|
101
|
+
exec_git(:commit, args)
|
102
|
+
end
|
89
103
|
end
|
90
|
-
alias :
|
104
|
+
alias :ci :commit
|
91
105
|
|
92
106
|
def create_branch(url_or_title, reset=false)
|
93
107
|
require_git && require_config
|
@@ -412,8 +426,7 @@ class Gitcycle
|
|
412
426
|
|
413
427
|
`git --help`.scan(/\s{3}(\w+)\s{3}/).flatten.each do |cmd|
|
414
428
|
if command == cmd && !self.respond_to?(command)
|
415
|
-
|
416
|
-
Kernel.exec(*args)
|
429
|
+
exec_git(cmd, args)
|
417
430
|
end
|
418
431
|
end
|
419
432
|
|
@@ -596,6 +609,11 @@ class Gitcycle
|
|
596
609
|
end
|
597
610
|
end
|
598
611
|
|
612
|
+
def exec_git(command, args)
|
613
|
+
args.unshift("git", command)
|
614
|
+
Kernel.exec(*args)
|
615
|
+
end
|
616
|
+
|
599
617
|
def fix_conflict(options)
|
600
618
|
owner = options[:owner]
|
601
619
|
repo = options[:repo]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitcycle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 7
|
10
|
+
version: 0.2.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Winton Welsh
|