stub close issue command

This commit is contained in:
Collin M. Barrett 2019-07-02 15:20:28 -05:00
parent a02e32861c
commit b51039d6f1
3 changed files with 33 additions and 3 deletions

View file

@ -0,0 +1,30 @@
using System.Threading;
using System.Threading.Tasks;
using FilterLists.Agent.Infrastructure.Clients;
using MediatR;
namespace FilterLists.Agent.Features.Urls
{
public static class CloseUrlValidationIssue
{
public class Command : IRequest
{
}
public class Handler : AsyncRequestHandler<Command>
{
private const string AgentBotLabel = "agent bot";
private const string IssueTitle = "Url Validation Errors";
private readonly IAgentGitHubClient _gitHubClient;
public Handler(IAgentGitHubClient agentGitHubClient)
{
_gitHubClient = agentGitHubClient;
}
protected override async Task Handle(Command request, CancellationToken cancellationToken)
{
}
}
}
}

View file

@ -9,7 +9,7 @@
namespace FilterLists.Agent.Features.Urls
{
public static class CreateOrUpdateGitHubIssue
public static class CreateOrUpdateUrlValidationIssue
{
public class Command : IRequest
{

View file

@ -56,8 +56,8 @@ protected override async Task Handle(Command request, CancellationToken cancella
results.Add(new DataFileUrlValidationResults("Syntax.json", syntaxUrlErrors));
if(results.Any())
await _mediator.Send(new CreateOrUpdateGitHubIssue.Command(results), cancellationToken);
//TODO: else, close issue
await _mediator.Send(new CreateOrUpdateUrlValidationIssue.Command(results), cancellationToken);
await _mediator.Send(new CloseUrlValidationIssue.Command(), cancellationToken);
}
}
}