README.md 2.83 KB
Newer Older
Markus Frosch's avatar
Markus Frosch committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Redmine to GitHub
=================

This is a collection of scripts used to migrate issues from Redmine to Github.

## Concept

The idea is to transfer as much data as possible, so the Redmine installation
is no more needed.

But there should be a way to link properly to GitHub.

    https://redmine.example.com/issues/1234
    redirects to -> https://github.com/example/awesome/issues/45
    
* All important issue data is put into the new GitHub issue description
     * Meta data
     * Original description
     * Relations
     * Custom fields
     * Notes and changes
* Some data will me transfered into GitHub meta data
     * Status -> Labels
     * Category -> Tags
     * Assignee (from a map in settings.yml)
     * Milestone

## Installation

    bundle install
    
Copy `settings.example.yml` to `settings.yml` and setup your environment.

## Usage

    ./dump_redmine_versions.rb -R awesome
    ./dump_redmine_issues.rb -R awesome

Now have a look into the generated dump directory. This will give you an idea
what issues will be migrated, and what the result will look like.

Markus Frosch's avatar
Markus Frosch committed
42
43
44
    ./push_github_milestones.rb -R awesome -U organization -P reponame
    ./push_github_issues.rb -R awesome -U organization -P reponame

Markus Frosch's avatar
Markus Frosch committed
45
46
47
48
To add a comment in Redmine, that the issue has been migrated:

    ./push_redmine_redirect_comments.rb -R awesome

Markus Frosch's avatar
Markus Frosch committed
49
50
51
52
## Dump

During work some data is written to the `dump` directory to help with archiving.

Markus Frosch's avatar
Markus Frosch committed
53
54
55
56
* `<project>/issues.json` List of all issues (does not include all data)
* `<project>/issue/<issue_id>.json` Full issue data retrieved from Redmine 
* `<project>/issue/<issue_id>.md` Markdown output for review
* `<project>/versions.json` All versions from Redmine
Markus Frosch's avatar
Markus Frosch committed
57
* `<project>/attachments/download/<attachment_id>/<filename>` (Similar URL to what Redmine is using as download URLs) 
Markus Frosch's avatar
Markus Frosch committed
58
59
60
61
* `<project>/issue_map.json` Redmine Issue ID -> GitHub Issue URL 
* `<project>/issue_map.txt` Redmine Issue ID -> GitHub Issue URL 
* `<project>/version_map.json` Redmine Version ID -> GitHub Issue URL 
* `<project>/version_map.txt` Redmine Version ID -> GitHub Issue URL 
Markus Frosch's avatar
Markus Frosch committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

## License

    Copyright (C) 2017 Markus Frosch <markus.frosch@icinga.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.