CommandLine plumbing infrastructure
Related to #639
This is all the required infrastructure changes in form of some extension method to do the plumbing for the new CommandLine. Here is a sample branch that applies these changes to bbs2gh.
I went ahead and simplified it even more by creating an extension to add all commands to the rootCommand. Here is how it's supposed to be used:
public static async Task<int> Main(string[] args) // note that Main now returns a Task<int> instead of Task
{
Logger.LogDebug("Execution Started");
var serviceCollection = new ServiceCollection();
... // service registrations
var serviceProvider = serviceCollection.BuildServiceProvider();
var rootCommand = new RootCommand("Automate end-to-end Bitbucket Server to GitHub migrations.")
.AddCommands(serviceProvider);
...
}
- [x] Did you write/update appropriate tests
- [x] Release notes updated (if appropriate)
- [x] Appropriate logging output
- [x] Issue linked
- [x] Docs updated (or issue created)
Unit Test Results
0 tests 0 :heavy_check_mark: 0s :stopwatch: 0 suites 0 :zzz: 0 files 0 :x:
Results for commit bdd4a62b.
:recycle: This comment has been updated with latest results.
Integration Test Results
4 tests ±0 4 :heavy_check_mark: ±0 14m 46s :stopwatch: - 1m 43s 1 suites ±0 0 :zzz: ±0 1 files ±0 0 :x: ±0
Results for commit ecc9bdf0. ± Comparison against base commit c752c8ed.
:recycle: This comment has been updated with latest results.
| Package | Line Rate | Branch Rate | Complexity | Health |
|---|---|---|---|---|
| Octoshift | 89% | 75% | 854 | ✔ |
| bbs2gh | 73% | 65% | 261 | ➖ |
| ado2gh | 88% | 83% | 578 | ✔ |
| gei | 81% | 87% | 429 | ✔ |
| Summary | 85% (5378 / 6304) | 78% (1162 / 1490) | 2122 | ✔ |