def METHOD_NAME(project):
    """
    Sync the versions of a repo using its latest version.
    This doesn't register a new build,
    but clones the repo and syncs the versions.
    Due that `sync_repository_task` is bound to a version,
    we always pass the default version.
    :returns: The version slug that was used to trigger the clone.
    :rtype: str or ``None`` if failed
    """
    if not Project.objects.is_active(project):
        log.warning(
            'Sync not triggered because project is not active.',
            project_slug=project.slug,
        )
        return None
    try:
        version_identifier = project.get_default_branch()
        version = (
            project.versions.filter(
                identifier=version_identifier,
            ).first()
        )
        if not version:
            log.info('Unable to sync from version.', version_identifier=version_identifier)
            return None
        if project.has_feature(Feature.SKIP_SYNC_VERSIONS):
            log.info('Skipping sync versions for project.', project_slug=project.slug)
            return None
        options = {}
        if project.build_queue:
            # respect the queue for this project
            options['queue'] = project.build_queue
        _, build_api_key = BuildAPIKey.objects.create_key(project=project)
        log.debug(
            'Triggering sync repository.',
            project_slug=version.project.slug,
            version_slug=version.slug,
        )
        sync_repository_task.apply_async(
            args=[version.pk],
            kwargs={"build_api_key": build_api_key},
            **options,
        )
        return version.slug
    except Exception:
        log.exception('Unknown sync versions exception')
    return None