def fetch_issues(self, org, repo, output):
    """Fetch issues for a repository

    Args:
      org: The org that owns the repository
      repo: The directory for the repository
      output: The directory to write the results

    Writes the issues along with the first comments to a file in output
    directory.
    """
    client = graphql.GraphQLClient()

    num_issues_per_page = 100
    query_template = """{{