github_workflow 0.1.0 → 0.1.1
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/lib/github_workflow/cli.rb +8 -1
- data/lib/github_workflow/version.rb +1 -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: 2c073d0d1e0bf855b3d9bf14dca7d41c18634d05
|
4
|
+
data.tar.gz: c084c3180aa2fc5cb29056935f84c293c3856397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c71c01bb175d45d55c090642e2db0fec4082eedd6ff1b7c564ed1ea28cd9be91a9dd5d7bdd8ff91f588b564a1cd78f0c604d043fcbaf26a0e19259eec37513cd
|
7
|
+
data.tar.gz: f8cafa22481f1953cf886c8911266b528d467562e8926c7a727d6dad51048d808a3e053cbdbcd3762ff9f34b7d9884e7e1e2c9861c270290cff53021e0ab9032
|
data/lib/github_workflow/cli.rb
CHANGED
@@ -23,6 +23,8 @@ module GithubWorkflow
|
|
23
23
|
|
24
24
|
desc "create_pr", "Convert Issue to Pull Request"
|
25
25
|
|
26
|
+
method_option :base_branch, aliases: "-b", type: :string
|
27
|
+
|
26
28
|
def create_pr
|
27
29
|
ensure_github_config_present
|
28
30
|
ensure_origin_exists
|
@@ -31,6 +33,8 @@ module GithubWorkflow
|
|
31
33
|
|
32
34
|
desc "push_and_pr", "Push branch to origin and convert Issue to Pull Request"
|
33
35
|
|
36
|
+
method_option :base_branch, aliases: "-b", type: :string
|
37
|
+
|
34
38
|
def push_and_pr
|
35
39
|
ensure_github_config_present
|
36
40
|
push_and_set_upstream
|
@@ -152,11 +156,14 @@ module GithubWorkflow
|
|
152
156
|
JSON.generate(
|
153
157
|
{
|
154
158
|
head: current_branch,
|
155
|
-
base: "master",
|
159
|
+
base: options[:base_branch] || "master",
|
156
160
|
issue: issue_number_from_branch
|
157
161
|
}
|
158
162
|
)
|
159
163
|
).tap do |response|
|
164
|
+
puts response.status
|
165
|
+
puts response.body
|
166
|
+
|
160
167
|
if response.success?
|
161
168
|
pass("Issue converted to Pull Request")
|
162
169
|
say_info(JSON.parse(response.body)["url"])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Liscio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|