Skip to content

Instantly share code, notes, and snippets.

View leader-Bileti's full-sized avatar

leader-Bileti

View GitHub Profile
@reberhardt7
reberhardt7 / export_issues.py
Created July 17, 2015 20:05
Github Issues Export: This script exports all issues from a repository, along with comments and events, into a JSON file. It also produces a Markdown file that can be used to easily view the issues.
"""
This script uses Github's API V3 with Basic Authentication to export issues from
a repository. The script saves a json file with all of the information from the
API for issues, comments, and events (on the issues), downloads all of the
images attached to issues, and generates a markdown file that can be rendered
into a basic HTML page crudely mimicking Github's issue page. If the gfm module
is available, the script will go ahead and render it itself.
In the end, you'll be left with a folder containing a raw .json file (which you
can use to extract information for your needs, or to import it somewhere else),