-
Notifications
You must be signed in to change notification settings - Fork 78
Add configuration repository support to darc delete-default-channel
#5687
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
Conversation
darc delete-default-channel
52443ff to
a059406
Compare
…elete-default-channel
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 extends the darc delete-default-channel command to support modifying default channel configuration via the maestro-configuration repository, controlled by the DARC_USE_CONFIGURATION_REPOSITORY environment variable. This enables a transition period where both API-based and configuration-repository-based deletion can coexist.
Key Changes:
- Added configuration repository deletion support to
IConfigurationRepositoryManagerand implementation - Extended command-line options to include configuration repository parameters
- Updated operation logic to route to either configuration repository or API based on environment flag
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/Microsoft.DotNet.Darc.Tests/Operations/DeleteDefaultChannelOperationConfigRepoTests.cs |
Comprehensive test suite with 4 test cases covering deletion scenarios, file cleanup, custom paths, and file searching |
src/Microsoft.DotNet.Darc/DarcLib/ConfigurationRepository/LocalGitRepo.cs |
Updated DeleteFileAsync to handle file deletion with git operations |
src/Microsoft.DotNet.Darc/Darc/Options/UpdateDefaultChannelBaseCommandLineOptions.cs |
Changed base class to ConfigurationManagementCommandLineOptions to inherit config repo options |
src/Microsoft.DotNet.Darc/Darc/Options/DeleteDefaultChannelCommandLineOptions.cs |
Restructured to extend configuration management options and implement required interface |
src/Microsoft.DotNet.Darc/Darc/Operations/DeleteDefaultChannelOperation.cs |
Added branching logic to route deletion through config repo or API based on environment flag |
src/MaestroConfiguration/src/Microsoft.DotNet.MaestroConfiguration.Client/IConfigurationRepositoryManager.cs |
Added DeleteDefaultChannelAsync method signature |
src/MaestroConfiguration/src/Microsoft.DotNet.MaestroConfiguration.Client/ConfigurationRepositoryManager.cs |
Implemented DeleteDefaultChannelAsync following the established deletion pattern |
src/Microsoft.DotNet.Darc/DarcLib/ConfigurationRepository/LocalGitRepo.cs
Show resolved
Hide resolved
src/Microsoft.DotNet.Darc/Darc/Options/DeleteDefaultChannelCommandLineOptions.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.DotNet.Darc.Tests/Operations/DeleteDefaultChannelOperationConfigRepoTests.cs
Outdated
Show resolved
Hide resolved
…elOperationConfigRepoTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…mandLineOptions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
Extends
darc delete-default-channelto modify default channel configuration via the maestro-configuration repository, controlled byDARC_USE_CONFIGURATION_REPOSITORYenvironment variable. This enables the transition period where both API-based and config-repo-based deletion can coexist.Changes
Interface & Implementation
DeleteDefaultChannelAsyncmethod toIConfigurationRepositoryManagerandConfigurationRepositoryManagerDeleteSubscriptionAsyncCommand Options
DeleteDefaultChannelCommandLineOptionsto extendConfigurationManagementCommandLineOptions--configuration-repository,--configuration-branch,--configuration-base-branch,--configuration-file,--no-prOperation Logic
DeleteDefaultChannelOperationnow resolves the default channel once, then branches based onShouldUseConfigurationRepositoryDefaultChannelmodel toDefaultChannelYamland callsDeleteDefaultChannelAsyncDeleteDefaultChannelAsync(id)callTesting
DeleteDefaultChannelOperationConfigRepoTestswith 4 test cases covering deletion from files, file cleanup, custom paths, and file searchingUsage
Original prompt
darc delete-default-channelwork with the Configuration repo #5506✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.