code: def repository_name(doc):
      
      for repository_id, repo in doc.get('repositories', {}).items():
          repo['id'] = repository_id
          repo['organisation_id'] = doc['_id']
  
          name = repo.get('name', None)
          if name:
              yield name, repository_id
docs: View for checking repository name is unique