don't add retired components to Bugzilla

Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
Nils Philippsen 2019-11-25 14:31:50 +01:00
parent e7ddb4f8ac
commit a287c60ce5

View file

@ -417,9 +417,15 @@ class BugzillaProxy:
) )
print(f"[NOCHANGE] {package}/{bz_product_name}") print(f"[NOCHANGE] {package}/{bz_product_name}")
else: else:
bz_product_name = self.config['products'][collection].get('bz_product_name', collection)
if retired:
if self.config['verbose']:
print(f"[NOADD] {bz_product_name}/{package}")
return
# Add component # Add component
data = { data = {
'product': self.config['products'][collection].get('bz_product_name', collection), 'product': bz_product_name,
'component': package, 'component': package,
'description': description or 'NA', 'description': description or 'NA',
'initialowner': owner_email, 'initialowner': owner_email,
@ -430,7 +436,7 @@ class BugzillaProxy:
data['initialcclist'] = initial_cc_emails data['initialcclist'] = initial_cc_emails
if self.config["verbose"]: if self.config["verbose"]:
print('[ADDCOMP] %s/%s' % (data["product"], data["component"])) print(f"[ADDCOMP] {bz_product_name}/{package}")
for key in ["initialowner", "description", "initialqacontact", for key in ["initialowner", "description", "initialqacontact",
"initialcclist", "is_active"]: "initialcclist", "is_active"]:
if print_fas_names and key in ('initialowner', if print_fas_names and key in ('initialowner',