def METHOD_NAME(git_tree, is_weekly=False):
    g = Git(git_tree)
    today = datetime.now().strftime('%Y-%m-%dT%H:%M:%S.%f')
    version = g.describe("--abbrev=12")
    published = False
    data = get_versions()
    if not is_weekly:
        wday = datetime.today().strftime('%A')
        if wday == 'Monday':
            is_weekly = True
    found = list(filter(lambda item: (isinstance(item, dict) and
                        item.get('version') == version) or item == version, data))
    if found:
        published = True
        print("version already published")
    else:
        print(f"New version {version}, adding to file...")
    if data and not published:
        with open(VERSIONS_FILE, "w") as versions:
            item = {}
            item['version'] = version
            item['date'] = today
            item['weekly'] = is_weekly
            data.append(item)
            json.dump(data, versions)