class_docstr: Helper class to output a list of logs entries on a superset changelog format
  
  We want to map a git author to a github login, for that we call github's API
code: def _get_pull_request_details(
      self, git_log: GitLog
  ) -> dict[str, Any]:
      pr_number = git_log.pr_number
      if pr_number:
          detail = self._pr_logs_with_details.get(pr_number)
          if detail:
              return detail
          pr_info = self._fetch_github_pr(pr_number)
  
      has_migrations = self._has_commit_migrations(git_log.sha)
      title = pr_info.title if pr_info else git_log.message
      pr_type = re.match(SUPERSET_PULL_REQUEST_TYPES, title)
      if pr_type:
          pr_type = pr_type.group().strip('"')  # type: ignore
  
      labels = (" | ").join([label.name for label in pr_info.labels])
      is_risky = self._is_risk_pull_request(pr_info.labels)
      detail = {
          "id": pr_number,
          "has_migrations": has_migrations,
          "labels": labels,
          "title": title,
          "type": pr_type,
          "is_risky": is_risky or has_migrations,
      }
  
      if pr_number:
          self._pr_logs_with_details[pr_number] = detail
  
      return detail
  
imports: import csv
  import os
  import re
  import sys
  from collections.abc import Iterator
  from dataclasses import dataclass
  from typing import Any, Optional, Union
  import click
  from click.core import Context
label_desc: Use image node_id 5 for calling the GitChangeLog obj's underlying member method code with example usage: obj._get_pull_request_details(git_log) and returns: detail, detail