Package: tratihubis
Tratihubis converts Trac tickets to Github issues by using the following steps:The user manually exports the Trac tickets to convert to a CSV file.Tratihubis reads the CSV file and uses the data to create Github issues and milestones.InstallationTo install tratihubis, usepiporeasy_install:$ pip install tratihubisIf necessary, this also installs thePyGithubpackage.UsageInformation about Trac tickets to convert has to be provided in a CSV file. To obtain this CSV file, create a
new Trac queries using the SQL statement stored inquery_tickets.sqlandquery_comments.sql.   Then
execute the queries and save the results by clicking “Download in other formats: Comma-delimited Text” and
choosing for example/Users/me/mytool/tickets.csvand/Users/me/mytool/comments.csvas output files.Next create a config file to describe how to login to Github and what to convert. For example, you could
store the following in~/mytool/tratihubis.cfg:[tratihubis]
user = someone
password = secret
repo = mytool
tickets = /Users/me/mytool/tickets.csv
comments = /Users/me/mytool/comments.csvThen run:$ tratihubis ~/mytool/tratihubis.cfgThis tests that the input data and Github information is valid and writes a log to the console describing
which operations would be performed.To actually create the Github issues, you need to enable to command line option--really:$ tratihubis --really ~/mytool/tratihubis.cfgBe aware that Github issues and milestones cannot be deleted in case you mess up. Your only remedy is to
remove the whole repository and start anew. So make sure that tratihubis does what you want before you
enable--really.Mapping usersIn case the Trac users have different user names on Github, you can specify a mapping. For example:users = johndoe: jdoe78, *: meThis would map the Trac userjohndoeto the Github userjdoe78and everyone else to the userme.
The default value is:users = *:*This maps every Trac user to a Github user with the same name.Mapping labelsGithub labels somewhat mimic the functionality Trac stores in thetypeandresolutionfield of
tickets. By default, Github supports the following labels:bugduplicateenhancementinvalidquestionwontfixTrac on the other hand has atypefield which by default can be:bugenhancementtaskFurthermore closed Trac tickets have aresolutionwhich, among others, can be:duplicateinvalidwontfixThelabelsconfig option allows to map Trac fields to Github labels. For example:labels = type=defect: bug, type=enhancement: enhancement, resolution=wontfix: wontfixHere,labelsis a comma separated list of mappings taking the form<trac-field>=<trac-value>:<github-label>.In case types or labels contain other characters than ASCII letters, digits and underscore (_), put them
between quotes:labels = type="software defect": bugAttachmentsYou can find some notes on this inissue #19 <https://github.com/roskakori/tratihubis/issues/19>: Add
documentation forattachmentsprefix.LimitationsThe author of Github issues and comments always is the user specified in the config, even if a different
user opened the original Trac ticket or wrote the original Trac comment.Github issues and comments have the current time as time stamp instead if time from Trac.Github issue descriptions contains the raw Trac Wiki markup, there is no translation to Github markdown.The due date of Trac milestones is not migrated to Github milestones, so when the conversion is done, you
have to set it manually.Trac Milestone without any tickets are not converted to Github milestone.SupportIn case of questions and problems, open an issue at <https://github.com/roskakori/tratihubis/issues>.To obtain the source code or create your own fork to implement fixes or improvements, visit
<https://github.com/roskakori/tratihubis>.LicenseCopyright (c) 2012-2013, Thomas Aglassinger. All rights reserved. Distributed under theBSD License.ChangesVersion 0.5, 2013-02-13(Contributed by Steven Di Rocco)Added support for file attachments.Added work around for information lost due GitHub API limitations:
* Added trac commenter and date at the top of each comment.
* Added automatic comment to each isseu showing original author, date authored, and last modification date.Fixed API calls to work with PyGithub 1.8.Version 0.4, 2012-05-04Added config optionlabelsto map Trac status and resolution to  Github labels.Version 0.3, 2012-05-03Added config optioncommentsto convert Trac ticket comments.Added closing of issue for which the corresponding Trac ticket has been closed already.Added validation of users issues are assigned to. They must have an active Github user.Version 0.2, 2012-05-02Added config optionusersto map Trac users to Github users.Added binary in order to runtratihubisinstead ofpython-mtratihubis.Changed supposed issue number in log to take existing issues in account.Version 0.1, 2012-05-01Initial release.