github_workflow 0.2.2 → 0.2.7
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/.ruby-version +1 -1
- data/github_workflow.gemspec +1 -1
- data/lib/github_workflow/cli.rb +21 -23
- data/lib/github_workflow/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd34e7ccc61455fbd20b4a44a595b4c67bceb681e5a0000b225f0742dedcf782
|
4
|
+
data.tar.gz: a19510e84f70f050fe68aa366fb1f77f9c25fdb2d6f7d47f434956870f2b07b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43a75473f684b1f26a292d16162d3af8378f6c62f3a88e16769baba38ded0cdfcb2c5b8f7448f0d7040d56fda55073622c5671097b42d643bd6f55e36b814c9c
|
7
|
+
data.tar.gz: 4499e70d105b351700d8b1c43bd1941a38a85db21f678b9cbfae8f11d340b956efee3c92e5f928c9241c07edbd6b5940df0071130b7c267f1a7273d686568a96
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.6
|
data/github_workflow.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "thor", "~> 0.
|
20
|
+
spec.add_dependency "thor", "~> 1.0.1"
|
21
21
|
spec.add_dependency "faraday", "~> 0.11"
|
22
22
|
spec.add_dependency "terminal-table", "~> 1.5"
|
23
23
|
spec.add_dependency "ruby-trello", "~> 2.1"
|
data/lib/github_workflow/cli.rb
CHANGED
@@ -182,7 +182,7 @@ module GithubWorkflow
|
|
182
182
|
title: trello_card.name,
|
183
183
|
body: issue_body_from_trello_card,
|
184
184
|
assignees: [current_github_username],
|
185
|
-
labels:
|
185
|
+
labels: trello_card.labels.map(&:name)
|
186
186
|
}
|
187
187
|
|
188
188
|
response = JSON.parse(github_client.post("repos/#{user_and_repo}/issues?access_token=#{oauth_token}", issue_params.to_json).body)
|
@@ -191,38 +191,35 @@ module GithubWorkflow
|
|
191
191
|
end
|
192
192
|
|
193
193
|
def issue_body_from_trello_card
|
194
|
-
|
195
|
-
|
196
|
-
body = <<~BODY
|
197
|
-
#{trello_card.desc}
|
198
|
-
|
199
|
-
**Deploy Note:** #{deploy_note}
|
200
|
-
BODY
|
194
|
+
[trello_card.desc, trello_deploy_note, trello_product_review_type, trello_pm].compact.join("\n\n")
|
201
195
|
end
|
202
196
|
|
203
|
-
def
|
204
|
-
|
197
|
+
def trello_pm
|
198
|
+
custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "PM" }
|
199
|
+
|
200
|
+
if custom_field.present?
|
201
|
+
"**Responsible:** #{custom_field.option_value['text']}"
|
202
|
+
end
|
205
203
|
end
|
206
204
|
|
207
|
-
def
|
208
|
-
|
205
|
+
def trello_deploy_note
|
206
|
+
custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "Deploy Note" }
|
209
207
|
|
210
|
-
|
211
|
-
|
208
|
+
if custom_field.present?
|
209
|
+
"**Deploy Note:** #{custom_field.value['text']}"
|
212
210
|
end
|
211
|
+
end
|
213
212
|
|
214
|
-
|
215
|
-
|
216
|
-
end
|
213
|
+
def trello_product_review_type
|
214
|
+
custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "Product Review" }
|
217
215
|
|
218
|
-
|
219
|
-
|
216
|
+
if custom_field.present?
|
217
|
+
"**Product Review:** #{custom_field.option_value['text']}"
|
220
218
|
end
|
219
|
+
end
|
221
220
|
|
222
|
-
|
223
|
-
|
224
|
-
labels << "Priority: #{priority_titleized}"
|
225
|
-
end
|
221
|
+
def current_github_username
|
222
|
+
JSON.parse(github_client.get("user?access_token=#{oauth_token}").body)["login"]
|
226
223
|
end
|
227
224
|
|
228
225
|
def set_trello_card
|
@@ -234,6 +231,7 @@ module GithubWorkflow
|
|
234
231
|
def trello_card
|
235
232
|
@trello_card
|
236
233
|
end
|
234
|
+
|
237
235
|
def ensure_github_config_present
|
238
236
|
unless project_config && project_config["oauth_token"] && project_config["user_and_repo"]
|
239
237
|
failure('Please add `.github` file containing `{ "oauth_token": "TOKEN", "user_and_repo": "user/repo" }`')
|
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.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Liscio
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '10.0'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email:
|
113
113
|
- bliscio@daisybill.com
|
114
114
|
executables:
|
@@ -129,7 +129,7 @@ homepage: https://github.com/daisybill/github_workflow
|
|
129
129
|
licenses:
|
130
130
|
- MIT
|
131
131
|
metadata: {}
|
132
|
-
post_install_message:
|
132
|
+
post_install_message:
|
133
133
|
rdoc_options: []
|
134
134
|
require_paths:
|
135
135
|
- lib
|
@@ -144,9 +144,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
|
-
|
148
|
-
|
149
|
-
signing_key:
|
147
|
+
rubygems_version: 3.0.3
|
148
|
+
signing_key:
|
150
149
|
specification_version: 4
|
151
150
|
summary: DaisyBill's internal github workflows
|
152
151
|
test_files: []
|