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>]``
docstr: Returns a flat list of the repository's contents.
  
  .. note::
  
      This method has a limit of 100,000 entries and 7MB response size.
      `Documentation <https://docs.github.com/en/rest/git/trees>`_.
  
  Args:
      recursive (True): whether to recursively traverse subdirectories
  
  Returns:
      a list of file info dicts
docstr_tok: ["Returns","a","flat","list","of","the","repository","'s","contents",".","..","note",":",":","This","method","has","a","limit","of","100,000","entries","and","7MB","response","size",".","`","Documentation","<","https",":","\/\/docs.github.com\/en\/rest\/git\/trees",">","`","_",".","Args",":","recursive","(","True",")",":","whether","to","recursively","traverse","subdirectories","Returns",":","a","list","of","file","info","dicts"]
code: def list_repo_contents(self, recursive=True):
      """Returns a flat list of the repository's contents.
  
      .. note::
  
          This method has a limit of 100,000 entries and 7MB response size.
          `Documentation <https://docs.github.com/en/rest/git/trees>`_.
  
      Args:
          recursive (True): whether to recursively traverse subdirectories
  
      Returns:
          a list of file info dicts
      """
      if self.ref:
          ref = self.ref
      else:
          ref = self.get_repo_info()["default_branch"]
  
      url = f"https://api.github.com/repos/{self.user}/{self.repo}/git/trees/{ref}"
      if recursive:
          url += "?recursive=1"
  
      return self._get(url)["tree"]
  
imports: import logging
  import os
  import re
  import requests
  import eta.core.utils
  import eta.core.web
label_desc: Use image node_id 10 for calling the GitHubRepository obj's underlying member method code with example usage: obj.list_repo_contents(recursive) and returns: self