From 56c6472266ab3631653f9a193391262f6282ea31 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 16 Dec 2019 16:39:10 +0100 Subject: [PATCH] Read EPEL POC from pagure_poc.json instead of fedora-scm-requests Signed-off-by: Karsten Hopp --- distgit_bugzilla_sync/script.py | 34 ++++----------------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/distgit_bugzilla_sync/script.py b/distgit_bugzilla_sync/script.py index ea421a7..4f9d271 100644 --- a/distgit_bugzilla_sync/script.py +++ b/distgit_bugzilla_sync/script.py @@ -753,7 +753,8 @@ class DistgitBugzillaSync: self.pagure_projects.append({ 'namespace': namespace, 'name': name, - 'poc': poc, + 'poc': poc['fedora'], + 'epelpoc': poc['epel'], 'watchers': pagure_namespace_to_cc[namespace][name], }) @@ -862,40 +863,13 @@ class DistgitBugzillaSync: products_retired[product] = False # Check if the Bugzilla ticket assignee has been manually overridden - override_yaml = self._get_override_yaml(project, self.session) - if override_yaml.get(product) \ - and isinstance(override_yaml[product], str): - owner = override_yaml[product] - products_poc[product] = owner + if product = "Fedora EPEL": + products_poc[product] = project["epelpoc"] project['products_poc'] = products_poc project["products_retired"] = products_retired self.pagure_projects[idx] = project - @cache.cache_on_arguments() - def _get_override_yaml(self, project, session): - pagure_override_url = '{0}/{1}/raw/master/f/{2}/{3}'.format( - self.env['pagure_url'].rstrip('/'), - self.env['bugzilla']['override_repo'], - project['namespace'], - project['name'], - ) - - if self.env["verbose"]: - print('Querying {0}'.format(pagure_override_url)) - override_rv = session.get(pagure_override_url, timeout=30) - output = {} - if override_rv.status_code == 200: - try: - override_yaml = yaml.safe_load(override_rv.text) - output = override_yaml.get('bugzilla_contact', {}) - except yaml.YAMLError: - self.errors["SCM overrides"].append( - f"Failed to load yaml file at: {pagure_override_url}") - except AttributeError: - self.errors["SCM overrides"].append( - f"Invalid yaml file at: {pagure_override_url}") - return output @classmethod def main(cls):