Github issues (and pull requests) can be imported into Trac using this script.
This includes most "events" (assigning, closing, reopening, ...) and all comments, as well as GitHub labels (converted to keywords), issue status, etc.
Attachments are currently not migrated.
github2trac.py has similar parameters as the bugzilla2trac.py script:
github2trac - Imports a bug database from Github into Trac.
Usage: github2trac.py [options]
Available Options:
--token token_text - GitHub access token --repo owner/repo - GitHub repository (part of the URL) --tracenv /path/to/trac/env - Full path to Trac db environment -c | --clean - Remove current Trac tickets before importing --help | help - This help info
A Github token is needed because Github rate limits the API for anonymous requests. To generate one go to Github Settings -> Developer settings -> Personal access tokens. The token needs the public_repo permission (for public repositories) or repo permission (for private repositories).
Adrien Destugues based on the previous work of others for Mantis2Trac and Bugzilla2Trac