diff --git a/src/FilterLists.Agent/Features/Urls/CreateOrUpdateGitHubIssue.cs b/src/FilterLists.Agent/Features/Urls/CreateOrUpdateGitHubIssue.cs new file mode 100644 index 000000000..a48399021 --- /dev/null +++ b/src/FilterLists.Agent/Features/Urls/CreateOrUpdateGitHubIssue.cs @@ -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; + } + + public IEnumerable DataFileUrlValidationResults { get; } + } + + public class Handler : AsyncRequestHandler + { + protected override async Task Handle(Command request, CancellationToken cancellationToken) + { + throw new NotImplementedException(); + } + } + } +} \ No newline at end of file diff --git a/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs b/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs index 1a93dae09..ab6d9b908 100644 --- a/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs +++ b/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs @@ -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); } } }