Merge task branch for: refactor(hub): Konflikt-Merge-Methoden eindeutig benennen (ContinueMerge → ContinueConflictMerge)
This commit is contained in:
@@ -56,8 +56,8 @@ public interface IWorkerClient : INotifyPropertyChanged
|
|||||||
Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch);
|
Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch);
|
||||||
Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId);
|
Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId);
|
||||||
Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent);
|
Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent);
|
||||||
Task<MergeResultDto> ContinueMergeAsync(string taskId);
|
Task<MergeResultDto> ContinueConflictMergeAsync(string taskId);
|
||||||
Task AbortMergeAsync(string taskId);
|
Task AbortConflictMergeAsync(string taskId);
|
||||||
Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default);
|
Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default);
|
||||||
Task OpenInteractiveTerminalAsync(string taskId, CancellationToken ct = default);
|
Task OpenInteractiveTerminalAsync(string taskId, CancellationToken ct = default);
|
||||||
Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default);
|
Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default);
|
||||||
|
|||||||
@@ -278,11 +278,11 @@ public partial class WorkerClient : ObservableObject, IAsyncDisposable, IWorkerC
|
|||||||
public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent)
|
public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent)
|
||||||
=> _hub.InvokeAsync("WriteConflictResolution", taskId, path, resolvedContent);
|
=> _hub.InvokeAsync("WriteConflictResolution", taskId, path, resolvedContent);
|
||||||
|
|
||||||
public Task<MergeResultDto> ContinueMergeAsync(string taskId)
|
public Task<MergeResultDto> ContinueConflictMergeAsync(string taskId)
|
||||||
=> _hub.InvokeAsync<MergeResultDto>("ContinueMerge", taskId);
|
=> _hub.InvokeAsync<MergeResultDto>("ContinueConflictMerge", taskId);
|
||||||
|
|
||||||
public Task AbortMergeAsync(string taskId)
|
public Task AbortConflictMergeAsync(string taskId)
|
||||||
=> _hub.InvokeAsync("AbortMerge", taskId);
|
=> _hub.InvokeAsync("AbortConflictMerge", taskId);
|
||||||
|
|
||||||
public Task<MergeTargetsDto?> GetMergeTargetsAsync(string taskId)
|
public Task<MergeTargetsDto?> GetMergeTargetsAsync(string taskId)
|
||||||
=> TryInvokeAsync<MergeTargetsDto>("GetMergeTargets", taskId);
|
=> TryInvokeAsync<MergeTargetsDto>("GetMergeTargets", taskId);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject
|
|||||||
foreach (var file in Files)
|
foreach (var file in Files)
|
||||||
await _worker.WriteConflictResolutionAsync(_taskId, file.Path, file.ComposeResolvedContent());
|
await _worker.WriteConflictResolutionAsync(_taskId, file.Path, file.ComposeResolvedContent());
|
||||||
|
|
||||||
var result = await _worker.ContinueMergeAsync(_taskId);
|
var result = await _worker.ContinueConflictMergeAsync(_taskId);
|
||||||
if (string.Equals(result.Status, "merged", StringComparison.Ordinal))
|
if (string.Equals(result.Status, "merged", StringComparison.Ordinal))
|
||||||
CloseRequested?.Invoke();
|
CloseRequested?.Invoke();
|
||||||
else
|
else
|
||||||
@@ -105,7 +105,7 @@ public sealed partial class ConflictResolverViewModel : ObservableObject
|
|||||||
private async Task AbortAsync()
|
private async Task AbortAsync()
|
||||||
{
|
{
|
||||||
IsBusy = true;
|
IsBusy = true;
|
||||||
try { await _worker.AbortMergeAsync(_taskId); }
|
try { await _worker.AbortConflictMergeAsync(_taskId); }
|
||||||
catch (Exception ex) { Error = ex.Message; }
|
catch (Exception ex) { Error = ex.Message; }
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
|||||||
=> HubGuard(() => _mergeService.WriteResolutionAsync(
|
=> HubGuard(() => _mergeService.WriteResolutionAsync(
|
||||||
taskId, path, resolvedContent ?? "", CancellationToken.None));
|
taskId, path, resolvedContent ?? "", CancellationToken.None));
|
||||||
|
|
||||||
public Task<MergeResultDto> ContinueMerge(string taskId)
|
public Task<MergeResultDto> ContinueConflictMerge(string taskId)
|
||||||
=> HubGuard(async () =>
|
=> HubGuard(async () =>
|
||||||
{
|
{
|
||||||
var r = await _mergeService.ContinueMergeAsync(taskId, CancellationToken.None);
|
var r = await _mergeService.ContinueMergeAsync(taskId, CancellationToken.None);
|
||||||
@@ -366,7 +366,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
|||||||
return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage);
|
return new MergeResultDto(r.Status, r.ConflictFiles, r.ErrorMessage);
|
||||||
});
|
});
|
||||||
|
|
||||||
public Task AbortMerge(string taskId)
|
public Task AbortConflictMerge(string taskId)
|
||||||
=> HubGuard(async () =>
|
=> HubGuard(async () =>
|
||||||
{
|
{
|
||||||
var r = await _mergeService.AbortMergeAsync(taskId, CancellationToken.None);
|
var r = await _mergeService.AbortMergeAsync(taskId, CancellationToken.None);
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ public abstract class StubWorkerClient : IWorkerClient
|
|||||||
public virtual Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty<string>(), null));
|
public virtual Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty<string>(), null));
|
||||||
public virtual Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty<ConflictFileDto>()));
|
public virtual Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty<ConflictFileDto>()));
|
||||||
public virtual Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask;
|
public virtual Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask;
|
||||||
public virtual Task<MergeResultDto> ContinueMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), null));
|
public virtual Task<MergeResultDto> ContinueConflictMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), null));
|
||||||
public virtual Task AbortMergeAsync(string taskId) => Task.CompletedTask;
|
public virtual Task AbortConflictMergeAsync(string taskId) => Task.CompletedTask;
|
||||||
public virtual Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask;
|
public virtual Task StartPlanningSessionAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask;
|
||||||
public virtual Task OpenInteractiveTerminalAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask;
|
public virtual Task OpenInteractiveTerminalAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask;
|
||||||
public virtual Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask;
|
public virtual Task ResumePlanningSessionAsync(string taskId, CancellationToken ct = default) => Task.CompletedTask;
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ public class ConflictResolverViewModelTests
|
|||||||
WrittenPath = path; WrittenContent = resolvedContent; return Task.CompletedTask;
|
WrittenPath = path; WrittenContent = resolvedContent; return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Task<MergeResultDto> ContinueMergeAsync(string taskId)
|
public override Task<MergeResultDto> ContinueConflictMergeAsync(string taskId)
|
||||||
{
|
{
|
||||||
Continued = true;
|
Continued = true;
|
||||||
return Task.FromResult(new MergeResultDto(ContinueStatus, System.Array.Empty<string>(), null));
|
return Task.FromResult(new MergeResultDto(ContinueStatus, System.Array.Empty<string>(), null));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Task AbortMergeAsync(string taskId) { Aborted = true; return Task.CompletedTask; }
|
public override Task AbortConflictMergeAsync(string taskId) { Aborted = true; return Task.CompletedTask; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ sealed class FakeWorkerClient : IWorkerClient
|
|||||||
public Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty<string>(), null));
|
public Task<MergeResultDto> StartConflictMergeAsync(string taskId, string targetBranch) => Task.FromResult(new MergeResultDto("conflict", System.Array.Empty<string>(), null));
|
||||||
public Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty<ConflictFileDto>()));
|
public Task<MergeConflictsDto> GetMergeConflictsAsync(string taskId) => Task.FromResult(new MergeConflictsDto(taskId, System.Array.Empty<ConflictFileDto>()));
|
||||||
public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask;
|
public Task WriteConflictResolutionAsync(string taskId, string path, string resolvedContent) => Task.CompletedTask;
|
||||||
public Task<MergeResultDto> ContinueMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), null));
|
public Task<MergeResultDto> ContinueConflictMergeAsync(string taskId) => Task.FromResult(new MergeResultDto("merged", System.Array.Empty<string>(), null));
|
||||||
public Task AbortMergeAsync(string taskId) => Task.CompletedTask;
|
public Task AbortConflictMergeAsync(string taskId) => Task.CompletedTask;
|
||||||
public Task RejectReviewToQueueAsync(string taskId, string feedback) => Task.CompletedTask;
|
public Task RejectReviewToQueueAsync(string taskId, string feedback) => Task.CompletedTask;
|
||||||
public Task RejectReviewToIdleAsync(string taskId) => Task.CompletedTask;
|
public Task RejectReviewToIdleAsync(string taskId) => Task.CompletedTask;
|
||||||
public Task CancelReviewAsync(string taskId) => Task.CompletedTask;
|
public Task CancelReviewAsync(string taskId) => Task.CompletedTask;
|
||||||
|
|||||||
Reference in New Issue
Block a user