Don't index retired projects

While they should just have a README, it's still a waste of energy
for codesearch to index them in the first place.

Remove the special condition for deb- repos - they are all retired.

Change-Id: I60d90fccb607fcd48de42739188af5fb241ded7f
This commit is contained in:
Monty Taylor 2019-12-18 10:02:09 -05:00
parent ccb152d532
commit 837515213f
1 changed files with 7 additions and 7 deletions

View File

@ -36,18 +36,18 @@ GIT_PROTOCOL = os.environ.get('GIT_PROTOCOL', 'https://')
def main():
registry = u.ProjectsRegistry(PROJECTS_YAML)
projects = [entry['project'] for entry in registry.configs_list]
repos = {}
for project in projects:
for entry in registry.configs_list:
project = entry['project']
# Don't bother indexing RETIRED projects.
if entry.get('description', '').startswith('RETIRED'):
continue
if 'retired.config' in entry.get('acl-config', ''):
continue
# Ignore attic and stackforge, those are repos that are not
# active anymore.
if project.startswith(('openstack-attic', 'stackforge')):
continue
# ignore deb- projects that are forks of other projects intended for
# internal debian packaging needs only and are generally not of
# interest to upstream developers
if os.path.basename(project).startswith('deb-'):
continue
repos[project] = {
'url': "%(proto)s%(gitbase)s/%(project)s" % dict(
proto=GIT_PROTOCOL, gitbase=GIT_SERVER, project=project),