github_workflow 0.2.3 → 0.3.0

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
  SHA256:
3
- metadata.gz: 35c87a2d10f0a46a35f242c7c722c1f30e850e191ed0f3b69b111956d12085ca
4
- data.tar.gz: 891fdec40904b88c568e43b5af9d93a4ec9abd631020287699980662a1355b65
3
+ metadata.gz: 7dd46613c2e0f1ff3275713640c8e5752d7bc3d0bcd01b3368c22f7909107ba2
4
+ data.tar.gz: 98988775af47addfbc43a3cd5d393884e02d67d5a06b01b5b9aa9bc9d40302b9
5
5
  SHA512:
6
- metadata.gz: 68f4d4f057682d001b3d294b7fc8a944cc72e460d5bd2c67255a3e9fcb7ba456f075698ad1e0027a0c88a2b7e9b6d1714a887c552f866d6ed6141da2d6c1385f
7
- data.tar.gz: d29fddd4f15cd1a192cd2d9f183594c3e9c87697e109f4b0d5e39814da7b8b60bacfd2e3ea6aef73cce928bbd9a91a099411349ba00a962f144faaf85eebaf8b
6
+ metadata.gz: 65e5b2f17ecbc581627bebeeb1b22bdecf44a525cee027d649ad562c590f2956c65dd1c65adb8ee9395fc197f31c061d4468f33b58342f61d0e1e579885b3520
7
+ data.tar.gz: 5753a8dfb0252fc48c4625e024d417d3a086979079bd4ea1375a9fb3662b2072603bbcd9c5428d79b7cb3486c0c00a03fd43ca98f97cb530ff90e10039f23ed6
@@ -1 +1 @@
1
- 2.5.3
1
+ 2.7.1
@@ -17,8 +17,8 @@ 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.19"
21
- spec.add_dependency "faraday", "~> 0.11"
20
+ spec.add_dependency "thor", "~> 1.0.1"
21
+ spec.add_dependency "faraday", "~> 0.11", "< 2.0"
22
22
  spec.add_dependency "terminal-table", "~> 1.5"
23
23
  spec.add_dependency "ruby-trello", "~> 2.1"
24
24
 
@@ -12,7 +12,7 @@ module GithubWorkflow
12
12
 
13
13
  include Thor::Actions
14
14
 
15
- default_task :start
15
+ default_task :trello
16
16
 
17
17
  desc "start", "Create branch named with issue number and issue title"
18
18
  method_option :issue_id, aliases: "-i", type: :string, required: true
@@ -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: issue_labels_from_trello_card
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,42 +191,35 @@ module GithubWorkflow
191
191
  end
192
192
 
193
193
  def issue_body_from_trello_card
194
- [trello_card.desc, trello_deploy_note].compact.join("\n\n")
194
+ [trello_card.desc, trello_deploy_note, trello_product_review_type, trello_pm].compact.join("\n\n")
195
195
  end
196
196
 
197
- def trello_deploy_note
198
- custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "Deploy Note" }
197
+ def trello_pm
198
+ custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "PM" }
199
199
 
200
200
  if custom_field.present?
201
- "**Deploy Note:** #{custom_field.value['text']}"
201
+ "**Responsible:** #{custom_field.option_value['text']}"
202
202
  end
203
203
  end
204
204
 
205
- def current_github_username
206
- JSON.parse(github_client.get("user?access_token=#{oauth_token}").body)["login"]
207
- end
208
-
209
- def issue_labels_from_trello_card
210
- labels = trello_card.labels.map(&:name)
211
-
212
- product_review_type = trello_card.custom_field_items.detect do |cfi|
213
- cfi.custom_field.name == "Product Review"
214
- end
205
+ def trello_deploy_note
206
+ custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "Deploy Note" }
215
207
 
216
- if product_review_type && ["Review App", "Screenshot"].include?(product_review_type.option_value["text"])
217
- labels << "Product Review Required"
208
+ if custom_field.present?
209
+ "**Deploy Note:** #{custom_field.value['text']}"
218
210
  end
211
+ end
219
212
 
220
- priority = trello_card.custom_field_items.detect do |cfi|
221
- cfi.custom_field.name == "Priority"
222
- end
213
+ def trello_product_review_type
214
+ custom_field = trello_card.custom_field_items.detect { |cfi| cfi.custom_field.name == "Product Review" }
223
215
 
224
- if priority && priority.option_value["text"].present?
225
- priority_titleized = priority.option_value["text"]
226
- labels << "Priority: #{priority_titleized}"
216
+ if custom_field.present?
217
+ "**Product Review:** #{custom_field.option_value['text']}"
227
218
  end
219
+ end
228
220
 
229
- labels.compact
221
+ def current_github_username
222
+ JSON.parse(github_client.get("user?access_token=#{oauth_token}").body)["login"]
230
223
  end
231
224
 
232
225
  def set_trello_card
@@ -238,6 +231,7 @@ module GithubWorkflow
238
231
  def trello_card
239
232
  @trello_card
240
233
  end
234
+
241
235
  def ensure_github_config_present
242
236
  unless project_config && project_config["oauth_token"] && project_config["user_and_repo"]
243
237
  failure('Please add `.github` file containing `{ "oauth_token": "TOKEN", "user_and_repo": "user/repo" }`')
@@ -1,3 +1,3 @@
1
1
  module GithubWorkflow
2
- VERSION = "0.2.3"
2
+ VERSION = "0.3.0"
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.2.3
4
+ version: 0.3.0
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: 2019-10-18 00:00:00.000000000 Z
11
+ date: 2020-11-05 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: '0.19'
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: '0.19'
26
+ version: 1.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +31,9 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.11'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '2.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +41,9 @@ dependencies:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
43
  version: '0.11'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: terminal-table
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +114,7 @@ dependencies:
108
114
  - - "~>"
109
115
  - !ruby/object:Gem::Version
110
116
  version: '10.0'
111
- description:
117
+ description:
112
118
  email:
113
119
  - bliscio@daisybill.com
114
120
  executables:
@@ -129,7 +135,7 @@ homepage: https://github.com/daisybill/github_workflow
129
135
  licenses:
130
136
  - MIT
131
137
  metadata: {}
132
- post_install_message:
138
+ post_install_message:
133
139
  rdoc_options: []
134
140
  require_paths:
135
141
  - lib
@@ -144,9 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
150
  - !ruby/object:Gem::Version
145
151
  version: '0'
146
152
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.7.6
149
- signing_key:
153
+ rubygems_version: 3.1.2
154
+ signing_key:
150
155
  specification_version: 4
151
156
  summary: DaisyBill's internal github workflows
152
157
  test_files: []