def METHOD_NAME(github_token, new_version, from_version, git_rev_list):
    from_ver = from_version
    to_ver = new_version
    if from_ver is None and git_rev_list is None:
        raise click.BadParameter('Must set --from-version or --git-rev-list')
    if git_rev_list is None:
        git_rev_list = f'v{from_ver}..origin/release-{to_ver}'
    repo = Repo(".")
    commits = list(repo.iter_commits(git_rev_list, max_count=500, min_parents=2))
    pr_id_set = set(map(get_pull_request_id, commits)) - {None}
    g = Github(github_token)
    gh_repo = g.get_repo("telstra/open-kilda")
    pr_list = [gh_repo.get_pull(n) for n in pr_id_set]
    features = []
    bugs = []
    improvements = []
    issues = []
    components = set()
    schema_migration: bool = False
    for v in pr_list:
        labels = [l.name for l in v.get_labels()]
        components |= {l[2:].lower() for l in labels if l.startswith("C/")}
        pr = {
            'id': v.number,
            'title': v.title,
            'labels': sorted([l for l in labels if lable_filter(l)]),
            'issues': sorted(get_issues_from_pr(v)),
            'topics': sorted(generate_topic_list(labels))
        }
        if 'feature' in labels:
            features.append(pr)
        elif 'bug' in labels or 'bugfix' in labels:
            bugs.append(pr)
        elif 'improvement' in labels:
            improvements.append(pr)
        else:
            issues.append(pr)
        if 'DB Migration' in labels:
            schema_migration = True
    env = Environment(
        loader=FileSystemLoader('./tools/changelog-generator')
    )
    template = env.get_template("template.jinja2")
    print(template.render(features=features,
                          improvements=improvements,
                          issues=issues,
                          bugs=bugs,
                          components=components,
                          from_ver=from_ver,
                          to_ver=to_ver,
                          schema_migration=schema_migration,
                          date=datetime.date.today().strftime("%d/%m/%Y")))