From d1e6649df8ae2c1d9e663b8f1e533bdab9803c29 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Tue, 2 Jul 2019 14:57:49 -0500 Subject: [PATCH] add TODO to handle when to auto-close the issue --- .../Features/Urls/ValidateAllUrls.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs b/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs index ab6d9b908..186fc7908 100644 --- a/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs +++ b/src/FilterLists.Agent/Features/Urls/ValidateAllUrls.cs @@ -31,31 +31,33 @@ protected override async Task Handle(Command request, CancellationToken cancella var results = new List(); var licenseUrls = await _repo.GetAllAsync(); - var licenseUrlErrors = (await _mediator.Send(new ValidateUrls.Command(licenseUrls), cancellationToken)); + var licenseUrlErrors = await _mediator.Send(new ValidateUrls.Command(licenseUrls), cancellationToken); if (licenseUrlErrors.Any()) results.Add(new DataFileUrlValidationResults("License.json", licenseUrlErrors)); var listUrls = await _repo.GetAllAsync(); - var listUrlErrors = (await _mediator.Send(new ValidateUrls.Command(listUrls), cancellationToken)); + var listUrlErrors = await _mediator.Send(new ValidateUrls.Command(listUrls), cancellationToken); if (listUrlErrors.Any()) results.Add(new DataFileUrlValidationResults("FilterList.json", listUrlErrors)); var maintainerUrls = await _repo.GetAllAsync(); - var maintainerUrlErrors = (await _mediator.Send(new ValidateUrls.Command(maintainerUrls), cancellationToken)); + var maintainerUrlErrors = await _mediator.Send(new ValidateUrls.Command(maintainerUrls), cancellationToken); if (maintainerUrlErrors.Any()) results.Add(new DataFileUrlValidationResults("Maintainer.json", maintainerUrlErrors)); var softwareUrls = await _repo.GetAllAsync(); - var softwareUrlErrors = (await _mediator.Send(new ValidateUrls.Command(softwareUrls), cancellationToken)); + var softwareUrlErrors = await _mediator.Send(new ValidateUrls.Command(softwareUrls), cancellationToken); if (softwareUrlErrors.Any()) results.Add(new DataFileUrlValidationResults("Software.json", softwareUrlErrors)); var syntaxUrls = await _repo.GetAllAsync(); - var syntaxUrlErrors = (await _mediator.Send(new ValidateUrls.Command(syntaxUrls), cancellationToken)); + var syntaxUrlErrors = await _mediator.Send(new ValidateUrls.Command(syntaxUrls), cancellationToken); if (syntaxUrlErrors.Any()) results.Add(new DataFileUrlValidationResults("Syntax.json", syntaxUrlErrors)); - await _mediator.Send(new CreateOrUpdateGitHubIssue.Command(results), cancellationToken); + if(results.Any()) + await _mediator.Send(new CreateOrUpdateGitHubIssue.Command(results), cancellationToken); + //TODO: else, close issue } } }