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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9d551fbda6a545a0fb85ffbcefeb43a8bfb1f9c
4
- data.tar.gz: 9c6895664cdd69ce38ee216cef9422b3e4cf3493
3
+ metadata.gz: 2c073d0d1e0bf855b3d9bf14dca7d41c18634d05
4
+ data.tar.gz: c084c3180aa2fc5cb29056935f84c293c3856397
5
5
  SHA512:
6
- metadata.gz: 3aa3959df85a40b3334a23353779bd79dde7f108eaf2d0f5313668096410e4d5012ec371aa80a88cad9ebb4195ee1cdf31c80b10b06539e294f80f5685ab94fa
7
- data.tar.gz: 68f184bb3c52de1769f8d83a5e4e564e2f57dbbdc6607439c177e78ec1d4ec4a3bb5cdea2faf1045b0578cce611a51530ffb47daa6bf2d980d04ee0916bafaf5
6
+ metadata.gz: c71c01bb175d45d55c090642e2db0fec4082eedd6ff1b7c564ed1ea28cd9be91a9dd5d7bdd8ff91f588b564a1cd78f0c604d043fcbaf26a0e19259eec37513cd
7
+ data.tar.gz: f8cafa22481f1953cf886c8911266b528d467562e8926c7a727d6dad51048d808a3e053cbdbcd3762ff9f34b7d9884e7e1e2c9861c270290cff53021e0ab9032
@@ -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"])
@@ -1,3 +1,3 @@
1
1
  module GithubWorkflow
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-02-21 00:00:00.000000000 Z
11
+ date: 2017-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor