jeffwidman / bitbucket-issue-migration

A small script for migrating repo issues from Bitbucket to GitHub
GNU General Public License v3.0
316 stars 95 forks source link

Fix SSL issues. #15

Closed haysclark closed 8 years ago

haysclark commented 9 years ago

Fixed the SSL issue #12 by updating code to use latest GitHub python library. A lot of the code is based on arthur-debert google-code-issues-migrator project. Fixed a couple bugs with 'start' inject, and BitBucket's Rest API url.

jeanluct commented 9 years ago

Hi,

Thanks for your patch. I'm new to this Git thing, but I had some problems with your patch:

  1. The dry-run option is broken. I think the problem is to move the 3 lines from "# Set the status and labels" inside the preceding if block.
  2. The code immediately fails for me because of Unicode issues:
Adding issue [1]: Improve loop.plot, adding comments..Traceback (most recent call last):
  File "./migrate.py", line 331, in <module>
    add_comments_to_issue(github_issue, comments)
  File "./migrate.py", line 239, in add_comments_to_issue
    body = u'_From {user} on {created_at}_\n\n{body}'.format(**comment)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 48: ordinal not in range(128)

Not sure if this is a bug introduced by the patch. This particular issue on my BitBucket doesn't seem to contain anything unusual, just text.

Best,

JLT

haysclark commented 9 years ago

@jeanluct Thanks for the heads up! I'll totally forgot to test Dry run after refactoring the code.

haysclark commented 9 years ago

@jeanluct Thanks again for the heads up. e0af46a fixes the Dry Run bug and I also included some other bugs I noticed. I would have added some tests but I don't know how to author them in Python.

haysclark commented 9 years ago

This pull request should be ready to go. Resolves #12 and #13

jeffwidman commented 8 years ago

Thanks! New project maintainer here, so still coming up to speed.

25 did a massive overhaul that switched to using the new Github import API so we're not using PyGithub anymore, so I think the SSL issue shouldn't be a problem anymore.

I'm not sure whether the bug fixed in 724bde06c36b62f2a61508e677cfa719e03095b1 is still an issue after the changes in #25... if it is, do you mind rebasing and submitting as a separate PR?