gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

Include the name of the repo in the filename for Bitbucket Server archives

Open timrogers opened this issue 2 years ago • 4 comments

When running a Bitbucket Server migration, the archive from the Bitbucket Server instance is stored in the bbs_archive_downloads directory. At the moment, the filename only contains the migration ID.

This makes it hard to identify which file is which, which makes life difficult when we want to ask a customer for a copy of their archive for debugging purposes.

We should include the name of the repo in the filename alongside the ID.

I started implementing this in https://github.com/github/gh-gei/pull/817, but it isn't fully done. It requires some reworking of the code, as currently the file on the Bitbucket Server and the filename we use for the CLI are the same, which will no longer be the case.

Todo

  • [ ] When downloading and write the archive to the disk, use {bbs-project-name}-{bbs-repo-name}-{export-archvie-job-id} naming format for the archive name.

timrogers avatar Feb 16 '23 15:02 timrogers

Note: We don't have any control over the export archive name on the Bitbucket server since it's being generated by BBS.

ArinGhazarian avatar Feb 17 '23 18:02 ArinGhazarian

Is it not possible for you to rename the archive with the parameters given to bbs2gh after it has been copy off the bitbucket server? (--bbs-project / --bbs-repo )

colas31 avatar Apr 25 '23 11:04 colas31

Is it not possible for you to rename the archive with the parameters given to bbs2gh after it has been copy off the bitbucket server? (--bbs-project / --bbs-repo )

I agree that should be possible for us to do it this way.

dylan-smith avatar Apr 25 '23 16:04 dylan-smith

@colas31, after being copied off of the Bitbucket server we can def. rename the archive, my comment was about renaming the archive somehow on the server itself. I misunderstood the issue's description when I first read it.

ArinGhazarian avatar Apr 25 '23 23:04 ArinGhazarian