Skip to content

Commit 15945a0

Browse files
authored
fix: Pass dict to create_component instead of named parameters (#1229)
* feature: Add step to allow auto creating of components that do not yet exist in Jira for a project * fix: Pass dict to create_component instead of named parameters
1 parent 36de94b commit 15945a0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

jbi/jira/service.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,8 @@ def update_issue_components(
379379
return None, missing_components
380380

381381
for comp_name in missing_components:
382-
new_comp = self.client.create_component(
383-
project=context.jira.project,
384-
name=comp_name,
385-
)
382+
comp_data = {"name": comp_name, "project": context.jira.project}
383+
new_comp = self.client.create_component(comp_data)
386384
jira_components.append({"id": new_comp["id"]})
387385
missing_components.clear()
388386

0 commit comments

Comments
 (0)