Add path validation and logging for bbs2gh archive operations (Fixes …#1460
Add path validation and logging for bbs2gh archive operations (Fixes …#1460AakashSuresh2003 wants to merge 4 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds path validation and logging for bbs2gh archive operations to provide better error messages to users when invalid paths are specified. The changes address issue #1211 by validating that archive paths and BBS shared home directories exist before attempting migration operations.
- Adds validation for
--archive-pathto ensure the file exists when explicitly provided by users - Adds validation for
--bbs-shared-hometo ensure the directory exists when running on the Bitbucket instance (not using SSH/SMB download) - Adds logging to output the archive path before upload operations for better debugging
- Introduces
DirectoryExistsmethod toFileSystemProviderto support directory validation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandHandler.cs | Added path validation for archive files and BBS shared home directories in ValidateOptions, and added logging for archive path before upload operations |
| src/Octoshift/Services/FileSystemProvider.cs | Added DirectoryExists method to support directory existence validation, following the same pattern as existing FileExists method |
| src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandHandlerTests.cs | Added comprehensive test coverage including tests for validation failures, tests ensuring validation is skipped when using SSH/SMB, and test verifying archive path logging |
Unit Test Results 1 files 1 suites 10m 23s ⏱️ Results for commit 1390b46. ♻️ This comment has been updated with latest results. |
|
Hi @brianaj, Could you please review my PR and provide any suggestions? |
|
@AakashSuresh2003 were you able to functionally test it (screenshots would be nice)? And can you add release notes. |
|
Hi @brianaj, The functional test screenshot is attached below, and the release notes have been added
|
|
Thanks will work on shipping this in #1462 so I can run CI. |

…#1211)
ThirdPartyNotices.txt(if applicable)