mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add stub of CreateOrUpdateGitHubIssue command
This commit is contained in:
parent
d936a49621
commit
f1636f4369
2 changed files with 31 additions and 1 deletions
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FilterLists.Agent.Features.Urls.Models.ValidationResults;
|
||||
using MediatR;
|
||||
|
||||
namespace FilterLists.Agent.Features.Urls
|
||||
{
|
||||
public static class CreateOrUpdateGitHubIssue
|
||||
{
|
||||
public class Command : IRequest
|
||||
{
|
||||
public Command(IEnumerable<DataFileUrlValidationResults> dataFileUrlValidationResults)
|
||||
{
|
||||
DataFileUrlValidationResults = dataFileUrlValidationResults;
|
||||
}
|
||||
|
||||
public IEnumerable<DataFileUrlValidationResults> DataFileUrlValidationResults { get; }
|
||||
}
|
||||
|
||||
public class Handler : AsyncRequestHandler<Command>
|
||||
{
|
||||
protected override async Task Handle(Command request, CancellationToken cancellationToken)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ protected override async Task Handle(Command request, CancellationToken cancella
|
|||
if (syntaxUrlErrors.Any())
|
||||
results.Add(new DataFileUrlValidationResults("Syntax.json", syntaxUrlErrors));
|
||||
|
||||
//TODO: create or edit GitHub issue with results
|
||||
await _mediator.Send(new CreateOrUpdateGitHubIssue.Command(results), cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue