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

Refactor the issue traversal & sorting from BB #44

Closed jeffwidman closed 8 years ago

jeffwidman commented 8 years ago

things to refactor:

jeffwidman commented 8 years ago

right now we do an in-memory sort, there's no need since BB api allows us to sort by local_id (v1 api) or id (v2 api)

Fixed in f4fd07d7492a0a7d5aa7fc208c5ddbef274ca38e

we could probably refactor to do a page-by-page processing rather than retrieving all issues and then submitting to github

After looking at this further, it's probably better to retrieve all the issues from BB before sending to GH to make sure no unexpected errors occur on the BB side.

for starting from a given id, probably the simplest is still retrieve all bb issues, and just drop the ones with ID before the desired ID. It's not the most efficient, but it's a lot cleaner to code/maintain.

This only applies if we switch to BB API v2 (#30), since it has no equivalent to start.