@@ -157,7 +157,13 @@ def load_config_env(self) -> dict:
157
157
158
158
temp_list = []
159
159
for config_key , config_value in ConfigKeyValuePair .items ():
160
+
161
+ if 'GITHUB_ACTIONS' in environ .keys ():
162
+ if environ ['GITHUB_ACTIONS' ]:
163
+ config_key = 'INPUT_' + config_key
164
+
160
165
if config_key in environ .keys ():
166
+ self .logger .debug ('Config found within environment variables - ' + str (config_key ) + ' - ' + str (config_value ))
161
167
temp_list .append (config_value )
162
168
163
169
self .logger .debug ('ConfigMap JSON key values found within environment variables - ' + str (temp_list ))
@@ -184,21 +190,39 @@ def load_config_env(self) -> dict:
184
190
for item in reversed (item_path ):
185
191
# temp_config_dict.update({item: environ[list_item.replace('.', '_').upper()]})
186
192
# break
187
- if list_item == 'jira.default_issue_labels' :
188
- temp_config_dict .update ({
189
- item : environ [list_item .replace ('.' , '_' ).upper ()].split (',' )
190
- })
193
+ if 'GITHUB_ACTIONS' in environ .keys ():
194
+ if environ ['GITHUB_ACTIONS' ]:
195
+ if list_item == 'INPUT_jira.default_issue_labels' :
196
+ temp_config_dict .update ({
197
+ item : environ [list_item .replace ('.' , '_' ).upper ()].split (',' )
198
+ })
199
+ else :
200
+ if list_item in ['INPUT_jira.use_atlassian_document_format' , 'INPUT_jira.create_sub_tasks' ]:
201
+ temp_config_dict .update ({
202
+ item : self .get_boolean (environ [list_item .replace ('.' , '_' ).upper ()])
203
+ })
204
+ else :
205
+ temp_config_dict .update ({
206
+ item : environ [list_item .replace ('.' , '_' ).upper ()]
207
+ })
208
+ config .update ({list_item .split ('.' )[0 ].replace ('INPUT_' ,'' ): temp_config_dict })
209
+ break
191
210
else :
192
- if list_item in [ 'jira.use_atlassian_document_format' , 'jira.create_sub_tasks' ] :
211
+ if list_item == 'jira.default_issue_labels' :
193
212
temp_config_dict .update ({
194
- item : self . get_boolean ( environ [list_item .replace ('.' , '_' ).upper ()])
213
+ item : environ [list_item .replace ('.' , '_' ).upper ()]. split ( ',' )
195
214
})
196
215
else :
197
- temp_config_dict .update ({
198
- item : environ [list_item .replace ('.' , '_' ).upper ()]
199
- })
200
- break
201
- config .update ({list_item .split ('.' )[0 ]: temp_config_dict })
216
+ if list_item in ['jira.use_atlassian_document_format' , 'jira.create_sub_tasks' ]:
217
+ temp_config_dict .update ({
218
+ item : self .get_boolean (environ [list_item .replace ('.' , '_' ).upper ()])
219
+ })
220
+ else :
221
+ temp_config_dict .update ({
222
+ item : environ [list_item .replace ('.' , '_' ).upper ()]
223
+ })
224
+ config .update ({list_item .split ('.' )[0 ]: temp_config_dict })
225
+ break
202
226
self .logger .debug ('Config from environment variables - ' + str (config ))
203
227
return config
204
228
0 commit comments