Migrate Bitbucket issues to Github, with comments.
We use the Python wrapper for Github API v3 to achieve this.
- Create a virtualenv and activate it.
- Clone this repo.
$ pip install -r requirements.txt$ python bb2gh_issues.py -h
You'll see an explanation of options.
$ python bb2gh_issues.py -l viniciusban -p my_password -r test_repo bb-issues.json
You must export your issues in Bitbucket, first.
Issues import cannot be undone. So, I suggest you to run this process in a test repository before importing them to your real one.
All issues created on Github will have your --login user as the creator and the commenter. So, each issue and comment will have a note to tell you who and when created the issue (or comment).
You can preserve issues' assignees. Edit bb2gh_issues.py and change the ASSIGNEES dict to represent your situation. Read comments on source code.
Depending on how many issues and comments you have, this process can take a while. Don't panic.
We don't import milestones or images. Pull requests are welcome. :-)
-
-l,--loginYou need to be logged in to create issues in Github. This is the username will be the creator of all issues and comments in this process.
-
-p,--passwordPassword for
--loginuser. -
-r,--repoThe repository will receive your issues.
-
-u,--userThe username who owns the repo. Also known as the username that appears in the repo url. I.e.: http://github.com/**this_is_the_username**/reponame
If ommited,
--loginwill be used. -
--no-assigneesDon't use assignee information.
-
fileThe JSON file name with Bitbucket exported issues.