Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

mkoeppe/trac-to-github

 
 

Repository files navigation

What

This script migrates milestones, issues/tickets, 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.

Features

  • 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.

Missing

  • Wiki pages could automatically be added to a projects wiki repository.
  • History on wiki pages is not kept.

How

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 and fourth bullet points.

Usage:

  1. copy migrate.cfg.example to migrate.cfg
  2. configure the values
  3. 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.

License

LGPL license version 3.0.

Requirements

  • Python 2 with xmlrpclib or Python 3; requests, PyGithub, see requirements.txt
  • Trac with XML-RPC plugin enabled

About

Script to migrate Trac tickets to GitHub issues

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%