Read EPEL POC from pagure_poc.json instead of fedora-scm-requests
Signed-off-by: Karsten Hopp <karsten@redhat.com>
This commit is contained in:
parent
abf7b7f747
commit
56c6472266
1 changed files with 4 additions and 30 deletions
|
@ -753,7 +753,8 @@ class DistgitBugzillaSync:
|
||||||
self.pagure_projects.append({
|
self.pagure_projects.append({
|
||||||
'namespace': namespace,
|
'namespace': namespace,
|
||||||
'name': name,
|
'name': name,
|
||||||
'poc': poc,
|
'poc': poc['fedora'],
|
||||||
|
'epelpoc': poc['epel'],
|
||||||
'watchers': pagure_namespace_to_cc[namespace][name],
|
'watchers': pagure_namespace_to_cc[namespace][name],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -862,40 +863,13 @@ class DistgitBugzillaSync:
|
||||||
products_retired[product] = False
|
products_retired[product] = False
|
||||||
|
|
||||||
# Check if the Bugzilla ticket assignee has been manually overridden
|
# Check if the Bugzilla ticket assignee has been manually overridden
|
||||||
override_yaml = self._get_override_yaml(project, self.session)
|
if product = "Fedora EPEL":
|
||||||
if override_yaml.get(product) \
|
products_poc[product] = project["epelpoc"]
|
||||||
and isinstance(override_yaml[product], str):
|
|
||||||
owner = override_yaml[product]
|
|
||||||
products_poc[product] = owner
|
|
||||||
project['products_poc'] = products_poc
|
project['products_poc'] = products_poc
|
||||||
project["products_retired"] = products_retired
|
project["products_retired"] = products_retired
|
||||||
|
|
||||||
self.pagure_projects[idx] = project
|
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
|
@classmethod
|
||||||
def main(cls):
|
def main(cls):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue