Conversation
aefacc4 to
824606a
Compare
Per https://developer.atlassian.com/cloud/bitbucket/deprecation-notice-v1-apis/, Bitbucket API version 1.0 is deprecated as of June 30 2018 and will no longer work in April of 2019. Alter the issue fetch methods to use the v2.0 API. Additionally, the "issues" collection is now streamed through the tool in order to support large issue sets with thousands of issues without a large memory footprint. Added a new option --mention-changes that formats status changes as comments; the new Bitbucket API now allows us to have these status changes available. I did notice that the "/changes/" API seems to throw a 500 on at least one issue persistently. The issue in question seems to have a broken assignee on it, so since this is a new API for BB that still has some bugs, it warns for 500 on just the "changes" API and skips.
The TEMPLATE constants are now stored in a local yaml file called templates.yaml, using the same template format (though a real template language with conditionals could be another improvement). The user can now make their own customizing template using the --use-template option.
824606a to
51e1b2c
Compare
jeffwidman
left a comment
There was a problem hiding this comment.
Great idea, it never cross my mind, but this is the right solution.
|
@zzzeek can you rebase so I can merge? If you haven't got time (I know you're a busy guy), I'm happy to do it, just let me know. |
|
hi jeff - if you could do it that woudl be great, as is the nature of an "issue migration" tool, I've migrated everything to github and haven't thought about this since :) just FYI I ended up going a lot further with the tool as I forked it into https://github.com/zzzeek/bitbucket-issue-migration where I went much further in how it works. the whole command API is different, I added a system for dealing with github rate limits, and it now prefers to import from a bitbucket export zip file (that has all the info about attachments in it) rather than using bitbucket's API. getting 4K issues from SQLAlchemy without getting banned from github (which happened a few times) took a lot of effort :) |
There seems to be enough variability in what someone might want in their exported issues /comments to warrant some customization of the templates, for example I am hoping to get rid of my bitbucket repos altogether once I figure out what I am going to migrate towards. This change moves the string templates into a nearby .yaml file that you can override on the command line. they are still plain format() strings. this is linked to my "use BB 2.0 API" pr as I'm building off that.