Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export Trac to Github Issues

Tags:

We use Trac for an open-source project I'm working on. I'd like to export all of our open tickets to Github's Issues. I've found a couple small scripts that might do it, but I was wondering if anyone has done this and has suggestions.

Ideally, it would convert trac's description syntax to markdown and also export metadata like milestone information, but even a simple, working export is probably okay.

like image 996
jterrace Avatar asked Jul 12 '11 21:07

jterrace


2 Answers

https://github.com/trustmaster/trac2github looks like it might work well, covering milestones, tickets, comments, converting usernames and setting assignees.

like image 144
Ewen Cheslack-Postava Avatar answered Sep 19 '22 10:09

Ewen Cheslack-Postava


I exported ticket details to a CSV file using a Trac query and converted them to Github issues using PyGithub. You can find the Python script and Trac query at http://pypi.python.org/pypi/tratihubis/.

The advantage of the CSV approach is that you do not need direct access to the database and it works with any database because all you need is a Trac query. Furthermore you can manually cleanup the CSV before import and e.g. remove tickets you do not want to convert to issues.

Thanks to PyGithub, all this works with Github API v3. API v2 has been deprecated, so some older scripts doing the same might not work anymore.

like image 41
roskakori Avatar answered Sep 20 '22 10:09

roskakori