agungsijawir / support-tools

Automatically exported from code.google.com/p/support-tools
Apache License 2.0
0 stars 0 forks source link

Code Review Request - BitBucket Issue Importer #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Branch name: development-oud

Purpose of code changes on this branch (generate_user_map.py):
1. Added a tool to auto-generate a file users.json, which maps Google Code user 
to BitBucket user.

Example:

{
    "users": {
        "oud@google.com": "oud-google",
        "oudavid86": "oudavid86"
    }
}

Please note that the user must change the right-side user, otherwise it will 
just default to the Google Code username.

2. Added a tool to convert issues data from Takeout into a format accepted by 
BitBucket (bitbucket_issue_converter.py).

I extracted the issues into a class GoogleCodeIssue and comments into 
GoogleCodeComment. These two classes can/should be shared with the GitHub issue 
importer. There are also two corresponding classes BitBucketIssue and 
BitBucketComment. Below is an example of the JSON that is generated from 
bitbucket_issue_converter.py.

Example:

{
    "comments": [
        {
            "content": "As the input size increases exponentially, we need to make sure that the algorithm isn't unnecessarily computing sums it doesn't need to.",
            "created_on": "2014-07-01T21:37:12.000Z",
            "id": 0,
            "issue": 1,
            "updated_on": "2014-07-01T21:37:12.000Z",
            "user": "oudavid86"
        },
        {
            "content": "Assigning issue to oudavid86.",
            "created_on": "2014-07-01T21:40:05.000Z",
            "id": 1,
            "issue": 1,
            "updated_on": "2014-07-01T21:40:05.000Z",
            "user": "oudavid86"
        }
    ],
    "issues": [
        {
            "assignee": "oudavid86",
            "content": "Need unit test to check that run-time complexity does not exceed O(N^2)",
            "content_updated_on": "2014-07-01T21:40:05.000Z",
            "created_on": "2014-07-01T21:37:12.000Z",
            "id": 1,
            "kind": "bug",
            "priority": "critical",
            "reporter": "oud-google",
            "status": "open",
            "title": "Need unit test to check that run-time complexity does not exceed O(N^2)",
            "updated_on": "2014-07-01T21:37:12.000Z"
        }
    ],
    "meta": {
        "default_kind": "task"
    }
}

A user can take this json, zip it up with attachments (if any), and import them 
into BitBucket here: 
https://bitbucket.org/<USER>/<PROJECT>/admin/issues/import-export

After the review, I'll merge this branch into:
/trunk

Original issue reported on code.google.com by o...@google.com on 14 Jul 2014 at 7:52

GoogleCodeExporter commented 9 years ago
PTAL

Original comment by o...@google.com on 14 Jul 2014 at 7:55

GoogleCodeExporter commented 9 years ago
Helpful links:

Migrating an hg-based project to BitBucket:
https://docs.google.com/a/google.com/document/d/1KE_9UTQ82SmbKJnOrTAgdY2KUn2FZRf
9JdwHjXWjHQo/edit?usp=sharing

Converting Google Code issues to BitBucket:
https://docs.google.com/a/google.com/document/d/1HxzX-hsl-LOztgcQk2eqJ_WLpRFuY0-
QJcH4Ubos6dc/edit?usp=sharing

Original comment by o...@google.com on 14 Jul 2014 at 7:58

GoogleCodeExporter commented 9 years ago

Original comment by srabbelier@google.com on 2 Sep 2014 at 4:34