The source project of this merge request has been removed.
Add error page for GH status validation page for bad requests
Compare changes
Files
2@@ -36,6 +36,7 @@ import org.eclipsefoundation.git.eca.namespace.ProviderType;
@@ -36,6 +36,7 @@ import org.eclipsefoundation.git.eca.namespace.ProviderType;
@@ -49,6 +50,12 @@ import io.quarkus.qute.Template;
@@ -49,6 +50,12 @@ import io.quarkus.qute.Template;
@@ -64,6 +71,8 @@ public class StatusResource extends GithubAdjacentResource {
@@ -64,6 +71,8 @@ public class StatusResource extends GithubAdjacentResource {
* Standard endpoint for retrieving raw validation information on a historic request, using the fingerprint for lookups.
@@ -97,10 +106,10 @@ public class StatusResource extends GithubAdjacentResource {
@@ -97,10 +106,10 @@ public class StatusResource extends GithubAdjacentResource {
@@ -120,47 +129,89 @@ public class StatusResource extends GithubAdjacentResource {
@@ -120,47 +129,89 @@ public class StatusResource extends GithubAdjacentResource {
public Response getCommitValidationForGithub(@PathParam("org") String org, @PathParam("repoName") String repoName,
throw new BadRequestException("Repo " + repoFullName + " requested, but does not have visible installation, returning");
ValidationRequest req = validationHelper.generateRequest(installationId, repoFullName, prNo, repoUrl);
.getHistoricValidationStatusByShas(wrapper, req.getCommits().stream().map(Commit::getHash).collect(Collectors.toList()));
throw new BadRequestException("Cannot validate request for " + repoFullName + "#" + prNo + " as it is already closed");
.getHistoricValidationStatusByShas(wrapper, r.getCommits().keySet().stream().collect(Collectors.toList()));