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>
Contributor
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>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.