code: def release_changelog_regenerate(obj):
      """Regenerate the whole CHANGELOG.md file"""
      issue_tracker, repo = obj["issue_tracker"], obj["repo"]
      changelogs = []
      issue_tracker = IssueTracker(issue_tracker=issue_tracker)
  
      for version in issue_tracker.project_versions():
          if not version.released:
              continue
          release = Release(
              version, repo=repo, issue_tracker=issue_tracker
          )
          click.echo(
              "Querying changelog for version: {}".format(version)
          )
          changelogs.append(release.changelog())
  
      click.echo("Rendering new CHANGELOG.md file...")
      changelog_path = pathlib.Path(repo) / "CHANGELOG.md"
      with changelog_path.open("w") as fp:
          for cl in changelogs:
              fp.write(cl.render("markdown"))
  
file_path: arrow/dev/archery/archery/release/cli.py
imports: import pathlib
  import click
  from ..utils.cli import validate_arrow_sources
  from .core import IssueTracker, Release
label_desc: Use image node_id 6 for calling a global function with example usage: release_changelog_regenerate(obj) without return types