-
Notifications
You must be signed in to change notification settings - Fork 75
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
Test PR to test copilot reviews #4212
Conversation
Copilot
AI
left a comment
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.
Copilot reviewed 5 out of 11 changed files in this pull request and generated 6 suggestions.
Files not reviewed (6)
- src/Microsoft.DotNet.Darc/DarcLib/ILocalGitRepo.cs: Evaluated as low risk
- src/Microsoft.DotNet.Darc/DarcLib/LocalGitRepo.cs: Evaluated as low risk
- src/Microsoft.DotNet.Darc/DarcLib/Models/VirtualMonoRepo/SourceManifest.cs: Evaluated as low risk
- src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CloneManager.cs: Evaluated as low risk
- src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/RepositoryCloneManager.cs: Evaluated as low risk
- src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/VmrCloneManager.cs: Evaluated as low risk
Comments skipped due to low confidence (2)
src/Microsoft.DotNet.Darc/Darc/Operations/GetChannelsOperation.cs:53
- Array literals should be created using the 'new' keyword. Use 'new string[] { "diff", "--name-only", "--diff-filter=U", "--relative" }' instead.
result = await vmr.RunGitCommandAsync(["diff", "--name-only", "--diff-filter=U", "--relative"]);
src/Microsoft.DotNet.Darc/Darc/Operations/GetChannelsOperation.cs:83
- Array literals should be created using the 'new' keyword. Use 'new string[] { "checkout", "--ours", file }' instead.
await vmr.RunGitCommandAsync(["checkout", "--ours", file]);
try | ||
var vmr = _localGitRepoFactory.Create(_vmrInfo.VmrPath); | ||
await vmr.CheckoutAsync(baseBranch); | ||
var result = await vmr.RunGitCommandAsync(["merge", "--no-commit", "--no-ff", targetBranch]); |
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.
Array literals should be created using the 'new' keyword. Use 'new string[] { "merge", "--no-commit", "--no-ff", targetBranch }' instead.
var result = await vmr.RunGitCommandAsync(["merge", "--no-commit", "--no-ff", targetBranch]); | |
var result = await vmr.RunGitCommandAsync(new string[] { "merge", "--no-commit", "--no-ff", targetBranch }); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
private async Task TryResolvingSourceManifestConflict(ILocalGitRepo vmr, string mappingName) | ||
{ | ||
// We load the source manifest from the target branch and replace the current mapping (and its submodules) with our branches' information | ||
var result = await vmr.RunGitCommandAsync(["show", "MERGE_HEAD:" + VmrInfo.DefaultRelativeSourceManifestPath]); |
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.
Array literals should be created using the 'new' keyword. Use 'new string[] { "show", "MERGE_HEAD:" + VmrInfo.DefaultRelativeSourceManifestPath }' instead.
var result = await vmr.RunGitCommandAsync(["show", "MERGE_HEAD:" + VmrInfo.DefaultRelativeSourceManifestPath]); | |
var result = await vmr.RunGitCommandAsync(new string[] { "show", "MERGE_HEAD:" + VmrInfo.DefaultRelativeSourceManifestPath }); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
|
||
_fileSystem.WriteToFile(_vmrInfo.SourceManifestPath, theirSourceManifest.ToJson()); | ||
_sourceManifest.Refresh(_vmrInfo.SourceManifestPath); | ||
await vmr.StageAsync([_vmrInfo.SourceManifestPath]); |
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.
Array literals should be created using the 'new' keyword. Use 'new string[] { _vmrInfo.SourceManifestPath }' instead.
await vmr.StageAsync([_vmrInfo.SourceManifestPath]); | |
await vmr.StageAsync(new string[] { _vmrInfo.SourceManifestPath }); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
var prBranch = "OutOfOrderMergesTest-ff"; | ||
|
||
_vmrInfo.VmrPath = new NativePath(path); | ||
await _cloneManager.PrepareVmrAsync([path], [targetBranch, prBranch], prBranch, default); |
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.
Array literals should be created using the 'new' keyword. Use 'new string[] { path }' and 'new string[] { targetBranch, prBranch }' instead.
await _cloneManager.PrepareVmrAsync([path], [targetBranch, prBranch], prBranch, default); | |
await _cloneManager.PrepareVmrAsync(new string[] { path }, new string[] { targetBranch, prBranch }, prBranch, default); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
{ | ||
// Write out a simple list of each channel's name | ||
foreach (var channel in allChannels.OrderBy(c => c.Name)) | ||
var path = @"C:\Users\prvysoky\AppData\Local\Temp\_vmrTests\wvzmghdz.ec2\_tests\xeihkfov.lgk\vmr"; |
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.
Hardcoded paths should be avoided in production code. Consider using a configuration setting or environment variable instead.
var path = @"C:\Users\prvysoky\AppData\Local\Temp\_vmrTests\wvzmghdz.ec2\_tests\xeihkfov.lgk\vmr"; | |
var path = Environment.GetEnvironmentVariable("VmrPath") ?? @"C:\Users\prvysoky\AppData\Local\Temp\_vmrTests\wvzmghdz.ec2\_tests\xeihkfov.lgk\vmr"; |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -172,6 +173,8 @@ public virtual IServiceCollection RegisterServices(IServiceCollection services) | |||
); | |||
services.TryAddSingleton<IRemoteTokenProvider>(_ => new RemoteTokenProvider(AzureDevOpsPat, GitHubPat)); | |||
services.TryAddSingleton<ICommandLineOptions>(_ => this); | |||
services.AddTransient<CodeFlowConflictResolver>(); |
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.
The lifetime of CodeFlowConflictResolver should be changed to scoped to match the lifetime of IVmrCloneManager, as CodeFlowConflictResolver depends on IVmrCloneManager.
services.AddTransient<CodeFlowConflictResolver>(); | |
services.AddScoped<CodeFlowConflictResolver>(); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
No description provided.