From 5211712f2362a8235844934b48871d0b29274ea8 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Thu, 21 Nov 2019 18:14:14 +0100 Subject: [PATCH] finish masking out email addresses Mask out email addresses of QA contacts and when adding components to BZ. Additionally, use descriptive placeholder if QA contact is unset and we default to the extras-qa alias. Signed-off-by: Nils Philippsen --- distgit_bugzilla_sync/script.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index 9baffca..b496ea6 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -256,6 +256,7 @@ class BugzillaProxy: qacontact_email = self._get_bugzilla_email(qacontact) else: qacontact_email = 'extras-qa@fedoraproject.org' + qacontact = f'' # Check for changes to the owner, qacontact, or description if product[pkg_key]['initialowner'] != owner_email: @@ -284,9 +285,13 @@ class BugzillaProxy: print(f'[EDITCOMP] {data["product"]}/{data["component"]}') for key in ["initialowner", "description", "initialqacontact", "initialcclist"]: if data.get(key): - if print_fas_names and key in ('initialowner', 'initialcclist'): + if print_fas_names and key in ('initialowner', + 'initialqacontact', + 'initialcclist'): if key == 'initialowner': value = owner + elif key == 'initialqacontact': + value = qacontact else: value = initial_cc_fasnames print(f" {key} changed to FAS name(s) `{value}`") @@ -313,6 +318,7 @@ class BugzillaProxy: qacontact_email = self._get_bugzilla_email(qacontact) else: qacontact_email = 'extras-qa@fedoraproject.org' + qacontact = f'' data = { 'product': self.config['products'][collection], @@ -327,7 +333,17 @@ class BugzillaProxy: if self.config["verbose"]: print('[ADDCOMP] %s/%s' % (data["product"], data["component"])) for key in ["initialowner", "description", "initialqacontact", "initialcclist"]: - if data.get(key): + if print_fas_names and key in ('initialowner', + 'initialqacontact', + 'initialcclist'): + if key == 'initialowner': + value = owner + elif key == 'initialqacontact': + value = qacontact + else: + value = initial_cc_fasnames + print(f" {key} set to FAS name(s) `{value}`") + else: print(f" {key} set to {data.get(key)}") if not self.config["dryrun"]: try: