File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 88
99components = ["Data Base" , "HTML" , "JavaScript" ]
1010
11- """That example show how to create components on all existing projects"""
11+ """That example show how to create components on all existing projects, only skipping the one in a provided list """
1212
13+ project_to_skip = [ "SI" , "SA" , "ETA" ]
14+
1315for i in jira .get_all_projects (included_archived = None ):
14- for j in compo :
15- data = {"project" : i ["key" ], "name" :j }
16- jira .create_component (data )
17- print ("{} - component created " .format (component .get ('name' )))
16+ if i ["key" ] in project_to_skip :
17+ print ("Skipping project {} " .format (i ["key" ]))
18+ else :
19+ for j in components :
20+ print ("Creating in project {} " .format (i ["key" ]))
21+ comp = {"project" : i ["key" ], "name" :j }
22+ jira .create_component (comp )
23+ print ("{} - component created " .format (comp .get ('name' )))
1824
You can’t perform that action at this time.
0 commit comments