Automatically clean up migration archives stored on the Bitbucket Server instance
When migrating a Bitbucket Server repo with gh bbs2gh migrate-repo, we make an API request to the Bitbucket Server instance to generate a migration archive, and that migration archive is deposited onto the Bitbucket Server instance's disk.
We copy the file off using scp, but that file will remain on the Bitbucket Server instance taking up space. It is not clear from Atlassian's docs when, if ever, that archive will be purged.
I propose that, by default, we delete the archive from the Bitbucket Server instance once we have copied it off of the Bitbucket Server instance.
To give users additional control, we may want to allow this behaviour to be disabled, leaving the archive on disk.
Before deciding to work on this issue, we should consider if we want to offer some kind of resume/retry functionality where the migration fails on GitHub's size. If the migration archive was still available (i.e. not deleted), we could conceivably use it rather than starting a new export.
We could alleviate the retry/failure concern by only deleting the archive at the end of the migrate-repo command AFTER everything has succeeded. If the github ingest fails we don't delete.
An implication of doing this is the SSH credentials used will require both read and write to the appropriate files/dirs.