This script migrates milestones, issues, and wiki pages from Trac to GitHub.
The script has its origin at https://github.com/moimael/trac-to-gitlab, which then has been extended to suite a specific use case of SVN+Trac to GitLab migration. Next, GitLab specific code has been removed and a migration to GitHub has been added.
- Title, description, comments to issues are copied over
- Component, issue type, priority, severity, and keywords are converted to labels
- Version and CC are added to the issue description
- Resolution is added as comment
- Issue text attachments are uploaded as Gist (GitHub doesn't allow to attach files to issues via the GitHub API) or all issue attachments are exported to files
- References to SVN commits can be replaced by references to Githashes.
- Wiki pages including attachments are exported into files that can be added to the GitHub project wiki repository.
- Wiki pages could automatically be added to a projects wiki repository.
- History on wiki pages is not kept.
Migrating a Trac project to GitHub is a relatively complex process involving four steps:
- Create a new project
- Migrate the repository
- Migrate issues and milestones
- Migrate wiki pages
This script takes care of the third bullet point.
Usage:
- copy
migrate.cfg.example
tomigrate.cfg
- configure the values
- run (
./migrate.py
). Make sure you test it on a test project prior, if you run it twice against the same project you will get duplicated issues.
LGPL license version 3.0.
- Python 2 with xmlrpclib, requests, PyGithub
- Trac with XML-RPC plugin enabled