trac-hub converts trac tickets into github issues. To this end, it accesses trac's underlying database and copies over milestones, creates tickets, and replays the change history of each ticket.
Copy the example YAML configuration and adapt it as needed:
cp config.yaml.example config.yaml vim config.yaml
Thereafter just invoke
By default, trac-hub assumes the file
config.yaml in the same directory as
the script. You can also specify the configuration file on the command line:
./trac-hub -c foo.yaml
-v flag for more verbose output:
To resume the migration at a given trac ticket ID, use
./trac-hub -s 42
One can also avoid migration of tickets whose title exists already in the github issue tracker:
Note: when converting your trac setup to github, it is prudent to first try the migration into a test repository which you can delete afterwards. If this worked out fine and delivered the expected results, one can still aim the script at the real repository.
The YAML configuration file contains four sections. The section
all trac-related configuration options. At this point trac-hub only supports
SQLite, but it would be trivial to add PostgreSQL and MySQL support.
github includes the repository to migrate as well as a list of
github account credentials. The latter enables creating issues/comments under
the corresponding github user. If trac-hub cannot map a trac user to a github
user, it defaults to the first account entry.
labels allows for custom label mappings. Since github's issue
tracker does not have a first-class notion of ticket priority, type, and
version information, trac-hub supports expressing these in the form of labels.
users contains a one-to-one mapping between trac usernames and
github usernames. Each github username must be an authorized collaborator with
push privileges; trac-hub ignores unauthorized mappings.
trac-hub comes with a BSD-style licence.