git_dj 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_dj/version.rb +1 -1
- data/lib/git_dj.rb +16 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd40ffe2f2a7c352aca313c66579acf6f13be03f
|
4
|
+
data.tar.gz: 44a277f42dc29e7c2271742a03107062c8c3aae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9e6332c2653493f8e0f1a2cf6347625cd33289c72c4d0965d024527931328b183c8f6493760bf408135e936a13e477c18a1ad20dfab83a988fe784e2426f05f
|
7
|
+
data.tar.gz: 0718edb3e7d86148cced1299e5c9d0025e6bf3f5c12548b070cfece5a797610e38b0452a7e737a74a4313071c50355c639c0aeaeb5ece2a563c67a86e5960f5b
|
data/lib/git_dj/version.rb
CHANGED
data/lib/git_dj.rb
CHANGED
@@ -25,6 +25,8 @@ class GitDj
|
|
25
25
|
continue_prev_commands
|
26
26
|
when "i"
|
27
27
|
integrate_current_branch_to_another
|
28
|
+
when 'pr'
|
29
|
+
create_pull_request
|
28
30
|
when 'help'
|
29
31
|
print_help
|
30
32
|
else
|
@@ -32,6 +34,13 @@ class GitDj
|
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
37
|
+
def create_pull_request
|
38
|
+
run_cmds [
|
39
|
+
"git push origin #{current_branch_name}",
|
40
|
+
"open #{current_repo_url}/compare/#{current_branch_name}?expand=1"
|
41
|
+
]
|
42
|
+
end
|
43
|
+
|
35
44
|
def integrate_current_branch
|
36
45
|
send_branch_to_integration('staging')
|
37
46
|
end
|
@@ -57,7 +66,7 @@ class GitDj
|
|
57
66
|
run_cmds [
|
58
67
|
"git checkout #{integration_branch}",
|
59
68
|
"git pull origin #{integration_branch}",
|
60
|
-
"git merge #{cur_branch}",
|
69
|
+
"git merge --no-edit #{cur_branch}",
|
61
70
|
"git push origin #{integration_branch}",
|
62
71
|
"git checkout #{cur_branch}"
|
63
72
|
]
|
@@ -117,6 +126,11 @@ class GitDj
|
|
117
126
|
branch_string.chomp.strip
|
118
127
|
end
|
119
128
|
|
129
|
+
def current_repo_url
|
130
|
+
url = %x(git ls-remote --get-url origin)
|
131
|
+
url[0..-6]
|
132
|
+
end
|
133
|
+
|
120
134
|
def print_help
|
121
135
|
puts %Q{Git DJ #{VERSION}
|
122
136
|
|
@@ -126,6 +140,7 @@ Usage:
|
|
126
140
|
#{green_color('gdj release')} - merge current branch into master, and switch back
|
127
141
|
#{green_color('gdj get')} - pull changes from origin to local
|
128
142
|
#{green_color('gdj put')} - pull, then push changes from origin to local
|
143
|
+
#{green_color('gdj pr')} - push current branch to origin, then open pull request in browser
|
129
144
|
#{green_color('gdj continue')} - continue previous failed command (after merge, etc)
|
130
145
|
|
131
146
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_dj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Tabunov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10
|
11
|
+
date: 2016-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple and lightweight alternative to git flow
|
14
14
|
email:
|