add stub of CreateOrUpdateGitHubIssue command

This commit is contained in:
Collin M. Barrett 2019-07-02 11:33:43 -05:00
parent d936a49621
commit f1636f4369
2 changed files with 31 additions and 1 deletions

View file

@ -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();
}
}
}
}

View file

@ -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);
}
}
}