diff --git a/src/FilterLists.Agent/Features/Urls/CloseUrlValidationIssue.cs b/src/FilterLists.Agent/Features/Urls/CloseUrlValidationIssue.cs new file mode 100644 index 000000000..3c0ce3929 --- /dev/null +++ b/src/FilterLists.Agent/Features/Urls/CloseUrlValidationIssue.cs @@ -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 + { + 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) + { + } + } + } +} \ No newline at end of file diff --git a/src/FilterLists.Agent/Features/Urls/CreateOrUpdateGitHubIssue.cs b/src/FilterLists.Agent/Features/Urls/CreateOrUpdateUrlValidationIssue.cs similarity index 98% rename from src/FilterLists.Agent/Features/Urls/CreateOrUpdateGitHubIssue.cs rename to src/FilterLists.Agent/Features/Urls/CreateOrUpdateUrlValidationIssue.cs index e5ed5444f..cb2fab2c4 100644 --- a/src/FilterLists.Agent/Features/Urls/CreateOrUpdateGitHubIssue.cs +++ b/src/FilterLists.Agent/Features/Urls/CreateOrUpdateUrlValidationIssue.cs @@ -9,7 +9,7 @@ namespace FilterLists.Agent.Features.Urls { - public static class CreateOrUpdateGitHubIssue + public static class CreateOrUpdateUrlValidationIssue { public class Command : IRequest { diff --git a/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs b/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs index 186fc7908..4d937534e 100644 --- a/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs +++ b/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs @@ -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); } } }