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({
|
||||
'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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue