mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
stub close issue command
This commit is contained in:
parent
a02e32861c
commit
b51039d6f1
3 changed files with 33 additions and 3 deletions
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace FilterLists.Agent.Features.Urls
|
||||
{
|
||||
public static class CreateOrUpdateGitHubIssue
|
||||
public static class CreateOrUpdateUrlValidationIssue
|
||||
{
|
||||
public class Command : IRequest
|
||||
{
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue