Repository navigation
Conversation
Apply JSON custom property values after successful Bitbucket migrations, with input validation, explicit partial-failure reporting, and bbs2gh-only CLI exposure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Post-migration update timeouts bypass the required recovery guidance and could prompt users to rerun a completed migration.
1 open finding
What changed in this PR
Adds optional custom-property assignment to bbs2gh migrate-repo after successful repository migration.
Changes:
- Adds and validates the
--custom-propertiesJSON option. - Applies properties through GitHub’s repository custom-properties API.
- Adds tests, documentation, and release notes.
| File | Description |
|---|---|
src/Octoshift/Services/GithubApi.cs |
Adds the custom-property PATCH request. |
src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs |
Defines the new CLI option. |
src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandArgs.cs |
Parses and validates property JSON. |
src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandHandler.cs |
Applies properties after migration. |
src/OctoshiftCLI.Tests/Octoshift/Services/GithubApiTests.cs |
Tests endpoint and payload behavior. |
src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs |
Tests option binding. |
src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandArgsTests.cs |
Tests input validation. |
src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandHandlerTests.cs |
Tests post-migration behavior and errors. |
README.md |
Documents usage and recovery. |
RELEASENOTES.md |
Announces the feature. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Unit Test Results 1 files 1 suites 24s ⏱️ Results for commit fb1a89f. ♻️ This comment has been updated with latest results. |
Change exception handling to catch all exceptions instead of just HttpRequestException. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Preserve migration-completed recovery guidance for HTTP failures, timeouts, cancellations, and exhausted API rate limits without catching unrelated exceptions. Add regression coverage and clarify recovery after an uncertain update result. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
brianaj
left a comment
There was a problem hiding this comment.
Thanks for putting this together. I don’t think this belongs in the extension as-is. If this is specific to a particular customer or migration, it should be a custom script maintained outside the extension. If this is a broadly used workflow for bbs2gh customers, it could be introduced as a separate, clearly supported command, but would suggest including product in that conversation.
Note once this becomes part of the extension, the ongoing maintenance and support responsibility falls to our team, so have to be particular about contributions.

ThirdPartyNotices.txt(if applicable)Closes #1628
Summary
Add optional
--custom-propertiesJSON input to bbs2gh migrate-repo only:--custom-properties '{"environment":"production","teams":["platform","security"]}'"true"or"false"strings.--queue-onlyand export-only operations.No new dependencies or licenses. No flags or behavior changes in ado2gh, gei, or gl2gh. The shared API method is called only by bbs2gh.
generate-scriptis not extended.Limitations
Properties must already exist in the destination organization, and the caller needs permission to edit their values. GitHub's migration input does not expose custom properties, so this is a post-migration update, not atomic repository creation. It does not resolve creation-time required-property policies in #1558 or #1563.
Validation
Commands ran with a session-local .NET 8 SDK on PATH:
dotnet format src/OctoshiftCLI.slndotnet format src/OctoshiftCLI.sln --no-restore --verify-no-changes --verbosity quietdotnet build src/OctoshiftCLI.sln /p:TreatWarningsAsErrors=true --verbosity quietdotnet build src/OctoshiftCLI.sln /p:TreatWarningsAsErrors=true /p:NuGetAudit=false --verbosity quietdotnet test src/OctoshiftCLI.Tests/OctoshiftCLI.Tests.csproj --no-build --no-restore --verbosity quietgit diff --checkCLI help confirmed the option is exposed only by bbs2gh. No live migration or integration tests were run; the contribution guide warns that local integration tests can interfere with shared CI resources.