class_docstr: Class for interacting with a GitHub repository.
  
  .. note::
  
      To interact with private GitHub repositories that you have access to,
      provide your GitHub personal access token by setting the
      ``GITHUB_TOKEN`` environment variable.
  
  Args:
      repo: the GitHub repository or identifier, which can be:
  
          -   a GitHub URL like ``https://github.com/<user>/<repo>``
          -   a GitHub ref like
              ``https://github.com/<user>/<repo>/tree/<branch>`` or
              ``https://github.com/<user>/<repo>/commit/<commit>``
          -   a GitHub ref string like ``<user>/<repo>[/<ref>]``
code: def parse_identifier(repo):
      params = repo.split("/")
      if len(params) < 2:
          raise ValueError(
              f"Invalid identifier '{repo}'. Expected <user>/<repo>[/<ref>]"
          )
  
      return dict(
          user=params[0],
          repo=params[1],
          ref=params[2] if len(params) > 2 else None,
      )
  
imports: import logging
  import os
  import re
  import requests
  import eta.core.utils
  import eta.core.web
label_desc: Use image node_id 16 for calling the GitHubRepository obj's underlying member method code with example usage: obj.parse_identifier(repo) and returns: dict