gitlab_support_readiness 1.0.89 → 1.0.91

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c8835592aa238eb94c87735d75b0843b1b818763c5216d5f459760207c223ff
4
- data.tar.gz: 53fb22b156d00e5591453c9c3bf1e7810bb26ddf9ed613afcea9a93420014e1e
3
+ metadata.gz: 8821be7610c98997a1e4729408f1cbdf0a395e2d3d3f3d5180a07edf456be3af
4
+ data.tar.gz: af7350684caffe7e6f86878534195942f28195920cec173835a0606d791e4c2a
5
5
  SHA512:
6
- metadata.gz: 6171098ac8c59bd806af5b37a062e32f9ad539f43c5ed84a9a21f3d925cfbdf0037297517dd99abdd2c87f31e97b0fe1003edff8aea411419abbb7ae9f70ccd4
7
- data.tar.gz: 47e02859ee9f1430b4a9ae8bd60ff3f2e6553cd1f1b3c953ce21c3f46c9ada88f235c77809f477d089f77362cf7b6520fd81a87f09b2007e7305d188bb24f02a
6
+ metadata.gz: c61ce0c51617799a7921a0fc6397d544a3993d1771c8946b8abcfbb768556044ebf03161dbac227118129800df70279fe7098308d620f5791bf89850fb9ab3de
7
+ data.tar.gz: 882d85ef8413349a26273681fc7e03a9dfaf7d0861179669ef655bbb09e35ff3a91d1e234b8be8f392010faeec52f2c80917f6a618cac2365cc1486e4642857d
@@ -237,7 +237,12 @@ module Readiness
237
237
  action['value'].each_with_index do |value, sub_index|
238
238
  next unless value == 'MANAGED_WEBHOOK'
239
239
 
240
- object['actions'][index]['value'][sub_index] = JSON.parse(File.read(path))
240
+ converted_value = JSON.parse(File.read(path))
241
+ if converted_value.is_a? Hash
242
+ object['actions'][index]['value'][sub_index] = converted_value.to_json
243
+ else
244
+ object['actions'][index]['value'][sub_index] = converted_value
245
+ end
241
246
  end
242
247
  end
243
248
  object
@@ -245,7 +245,12 @@ module Readiness
245
245
  action['value'].each_with_index do |value, sub_index|
246
246
  next unless value == 'MANAGED_WEBHOOK'
247
247
 
248
- object['actions'][index]['value'][sub_index] = JSON.parse(File.read(path))
248
+ converted_value = JSON.parse(File.read(path))
249
+ if converted_value.is_a? Hash
250
+ object['actions'][index]['value'][sub_index] = converted_value.to_json
251
+ else
252
+ object['actions'][index]['value'][sub_index] = converted_value
253
+ end
249
254
  end
250
255
  end
251
256
  object
@@ -46,7 +46,7 @@ module Readiness
46
46
  commit_message: 'Creating new macro',
47
47
  actions: [
48
48
  {
49
- file_path: path,
49
+ file_path: "data/#{path.gsub(/md$/, 'yaml')}",
50
50
  content: yaml_contents,
51
51
  action: 'create'
52
52
  }
@@ -116,10 +116,13 @@ module Readiness
116
116
  actions.push({ 'field' => 'current_tags', 'value' => tag })
117
117
  end
118
118
  if comment == 'Public'
119
- actions.push({ 'field' => 'comment_mode_is_public', 'value' => true })
119
+ actions.push({ 'field' => 'comment_mode_is_public', 'value' => 'true' })
120
120
  end
121
121
  if comment == 'Private'
122
- actions.push({ 'field' => 'comment_mode_is_public', 'value' => false })
122
+ actions.push({ 'field' => 'comment_mode_is_public', 'value' => 'false' })
123
+ end
124
+ if comment != 'none'
125
+ actions.push({ 'field' => 'comment_value', 'value' => 'MANAGED_CONTENT' })
123
126
  end
124
127
  actions
125
128
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.89
4
+ version: 1.0.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer