-
Notifications
You must be signed in to change notification settings - Fork 124
Add path validation and logging for bbs2gh archive operations (Fixes … #1460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add path validation and logging for bbs2gh archive operations (Fixes … #1460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
|
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)