diff --git a/pom.xml b/pom.xml index 92323dc26d9a86e1a187496ddc10e2153b624044..42a6674b5706fd2ba1111401ecc7247c850abb1b 100644 --- a/pom.xml +++ b/pom.xml @@ -15,10 +15,10 @@ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> - <quarkus.platform.version>3.2.11.Final</quarkus.platform.version> + <quarkus.platform.version>3.8.3</quarkus.platform.version> <surefire-plugin.version>3.1.2</surefire-plugin.version> <maven.compiler.parameters>true</maven.compiler.parameters> - <eclipse-api-version>0.9.6</eclipse-api-version> + <eclipse-api-version>1.0.0-RC1</eclipse-api-version> <auto-value.version>1.10.4</auto-value.version> <org.mapstruct.version>1.5.5.Final</org.mapstruct.version> <sonar.sources>src/main</sonar.sources> diff --git a/src/main/java/org/eclipsefoundation/git/eca/dto/CommitValidationMessage.java b/src/main/java/org/eclipsefoundation/git/eca/dto/CommitValidationMessage.java index e413eba8f9b3d7e86807c1581cd0a8d28df76596..1d66043bca17f4d15bcf257d357a76de28b86c1b 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/dto/CommitValidationMessage.java +++ b/src/main/java/org/eclipsefoundation/git/eca/dto/CommitValidationMessage.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Objects; import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.namespace.DefaultUrlParameterNames; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.http.namespace.DefaultUrlParameterNames; import org.eclipsefoundation.persistence.dto.BareNode; import org.eclipsefoundation.persistence.dto.filter.DtoFilter; import org.eclipsefoundation.persistence.model.DtoTable; diff --git a/src/main/java/org/eclipsefoundation/git/eca/dto/GithubApplicationInstallation.java b/src/main/java/org/eclipsefoundation/git/eca/dto/GithubApplicationInstallation.java index c93c0115286f4c0bb08dca8894b1d93b52b743bc..8d51e4ac77208f232601d62cfbbc8f6d2d3c8fb4 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/dto/GithubApplicationInstallation.java +++ b/src/main/java/org/eclipsefoundation/git/eca/dto/GithubApplicationInstallation.java @@ -15,6 +15,15 @@ import java.time.format.DateTimeParseException; import java.util.Date; import java.util.Objects; +import org.apache.commons.lang3.StringUtils; +import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.persistence.dto.BareNode; +import org.eclipsefoundation.persistence.dto.filter.DtoFilter; +import org.eclipsefoundation.persistence.model.DtoTable; +import org.eclipsefoundation.persistence.model.ParameterizedSQLStatement; +import org.eclipsefoundation.persistence.model.ParameterizedSQLStatementBuilder; +import org.eclipsefoundation.utils.helper.DateTimeHelper; + import jakarta.inject.Inject; import jakarta.inject.Singleton; import jakarta.persistence.Entity; @@ -24,15 +33,6 @@ import jakarta.persistence.Id; import jakarta.persistence.Table; import jakarta.ws.rs.core.MultivaluedMap; -import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; -import org.eclipsefoundation.persistence.dto.BareNode; -import org.eclipsefoundation.persistence.dto.filter.DtoFilter; -import org.eclipsefoundation.persistence.model.DtoTable; -import org.eclipsefoundation.persistence.model.ParameterizedSQLStatement; -import org.eclipsefoundation.persistence.model.ParameterizedSQLStatementBuilder; - /** * Tracking for github installation data for GH ECA applications used for requesting data and updating commit statuses. */ diff --git a/src/main/java/org/eclipsefoundation/git/eca/helper/CommitHelper.java b/src/main/java/org/eclipsefoundation/git/eca/helper/CommitHelper.java index 5f90c504b36a0a95d7e7899f054a024c33621d92..1d4693ba098ceda726bfa23ff13f96ea14201836 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/helper/CommitHelper.java +++ b/src/main/java/org/eclipsefoundation/git/eca/helper/CommitHelper.java @@ -15,11 +15,11 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.List; -import org.eclipsefoundation.core.exception.ApplicationException; import org.eclipsefoundation.efservices.api.models.Project; import org.eclipsefoundation.git.eca.model.Commit; import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.http.exception.ApplicationException; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import io.undertow.util.HexConverter; @@ -62,8 +62,7 @@ public class CommitHelper { } public static MultivaluedMap<String, String> getCommitParams(ValidationRequest req, String projectId) { - return getCommitParams(req.getCommits().stream().map(Commit::getHash).toList(), projectId, - req.getRepoUrl().toString()); + return getCommitParams(req.getCommits().stream().map(Commit::getHash).toList(), projectId, req.getRepoUrl().toString()); } public static MultivaluedMap<String, String> getCommitParams(List<String> commitShas, String projectId, String repoUrl) { @@ -77,9 +76,8 @@ public class CommitHelper { } /** - * Generates a request fingerprint for looking up requests that have already been processed in the past. Collision here - * is extremely unlikely, and low risk on the change it does. For that reason, a more secure but heavier hashing alg. - * wasn't chosen. + * Generates a request fingerprint for looking up requests that have already been processed in the past. Collision here is extremely + * unlikely, and low risk on the change it does. For that reason, a more secure but heavier hashing alg. wasn't chosen. * * @param req the request to generate a fingerprint for * @return the fingerprint for the request @@ -96,8 +94,7 @@ public class CommitHelper { } /** - * Centralized way of retrieving a checked project ID from a project for use when interacting with commits and commit - * data. + * Centralized way of retrieving a checked project ID from a project for use when interacting with commits and commit data. * * @param p the current project to attempt to retrieve an ID from * @return the project ID or the given default (empty string). diff --git a/src/main/java/org/eclipsefoundation/git/eca/helper/GithubValidationHelper.java b/src/main/java/org/eclipsefoundation/git/eca/helper/GithubValidationHelper.java index 15533a9bff41c98e628d0113a8a54f774fe94b15..131f135048d6736a02d7088e90c2de7d0ceead47 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/helper/GithubValidationHelper.java +++ b/src/main/java/org/eclipsefoundation/git/eca/helper/GithubValidationHelper.java @@ -22,9 +22,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.core.helper.TransformationHelper; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.core.service.APIMiddleware; import org.eclipsefoundation.git.eca.api.GithubAPI; import org.eclipsefoundation.git.eca.api.models.GithubCommit; @@ -45,9 +42,12 @@ import org.eclipsefoundation.git.eca.namespace.ProviderType; import org.eclipsefoundation.git.eca.service.GithubApplicationService; import org.eclipsefoundation.git.eca.service.ValidationService; import org.eclipsefoundation.git.eca.service.ValidationStatusService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; +import org.eclipsefoundation.utils.helper.DateTimeHelper; +import org.eclipsefoundation.utils.helper.TransformationHelper; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/eclipsefoundation/git/eca/helper/ProjectHelper.java b/src/main/java/org/eclipsefoundation/git/eca/helper/ProjectHelper.java index a39f8065594d08c0fb601ce82449836ea716d90c..b7d37034e87d0cfce12306914e06f1015a125c9c 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/helper/ProjectHelper.java +++ b/src/main/java/org/eclipsefoundation/git/eca/helper/ProjectHelper.java @@ -16,7 +16,7 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.service.CachingService; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.efservices.api.models.InterestGroup; import org.eclipsefoundation.efservices.api.models.Project; import org.eclipsefoundation.efservices.api.models.Project.GithubProject; @@ -144,7 +144,6 @@ public final class ProjectHelper { .setWebsiteRepo(Collections.emptyList()) .setGitlab(ig.getGitlab()) .setGithub(GithubProject.builder().setOrg("").setIgnoredRepos(Collections.emptyList()).build()) - .setWorkingGroups(Collections.emptyList()) .setIndustryCollaborations(Collections.emptyList()) .setReleases(Collections.emptyList()) .setTopLevelProject("") @@ -166,8 +165,7 @@ public final class ProjectHelper { * @return true if the project is a match via Gitlab repos or project namespace, false otherwise */ private boolean doesProjectMatchGitlabRepos(Project p, String repoUrl, String projectNamespace) { - return p.getGitlabRepos().stream().anyMatch(re -> re.getUrl() != null && re.getUrl().endsWith(repoUrl)) - || (projectNamespace.startsWith(p.getGitlab().getProjectGroup() + "/") + return (projectNamespace.startsWith(p.getGitlab().getProjectGroup() + "/") && p.getGitlab().getIgnoredSubGroups().stream().noneMatch(sg -> projectNamespace.startsWith(sg + "/"))); } diff --git a/src/main/java/org/eclipsefoundation/git/eca/namespace/GitEcaParameterNames.java b/src/main/java/org/eclipsefoundation/git/eca/namespace/GitEcaParameterNames.java index 3caa14dbcb51c83923a195837299e99258891fc4..e1d0c35d55e25cca971ed8bb6debf19ad6a08843 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/namespace/GitEcaParameterNames.java +++ b/src/main/java/org/eclipsefoundation/git/eca/namespace/GitEcaParameterNames.java @@ -14,9 +14,9 @@ package org.eclipsefoundation.git.eca.namespace; import java.util.Arrays; import java.util.List; -import jakarta.inject.Singleton; +import org.eclipsefoundation.utils.namespace.UrlParameterNamespace; -import org.eclipsefoundation.core.namespace.UrlParameterNamespace; +import jakarta.inject.Singleton; @Singleton public final class GitEcaParameterNames implements UrlParameterNamespace { diff --git a/src/main/java/org/eclipsefoundation/git/eca/resource/CommonResource.java b/src/main/java/org/eclipsefoundation/git/eca/resource/CommonResource.java index ac1ee2399fd8afaeb8457198e43e02f5c9af6f69..62dc2bf590faca8ffe250ca89c78ce67647b9d5d 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/resource/CommonResource.java +++ b/src/main/java/org/eclipsefoundation/git/eca/resource/CommonResource.java @@ -13,14 +13,14 @@ package org.eclipsefoundation.git.eca.resource; import java.util.Arrays; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.api.models.EclipseUser; import org.eclipsefoundation.git.eca.dto.GithubWebhookTracking; import org.eclipsefoundation.git.eca.service.UserService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; +import org.eclipsefoundation.utils.helper.DateTimeHelper; import io.quarkus.security.identity.SecurityIdentity; import io.smallrye.jwt.auth.principal.DefaultJWTCallerPrincipal; diff --git a/src/main/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResource.java b/src/main/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResource.java index 98aafc28a1fd5dc548fb91341b9a2f8889fd60dc..0a5f746fac6a73e0a2d0996455f9ea05b429ceef 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResource.java +++ b/src/main/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResource.java @@ -16,7 +16,6 @@ import java.util.List; import java.util.Optional; import org.apache.http.HttpStatus; -import org.eclipsefoundation.core.helper.TransformationHelper; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.PullRequest; import org.eclipsefoundation.git.eca.dto.GithubWebhookTracking; @@ -28,6 +27,7 @@ import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.namespace.HCaptchaErrorCodes; import org.eclipsefoundation.git.eca.namespace.WebhookHeaders; import org.eclipsefoundation.git.eca.service.GithubApplicationService; +import org.eclipsefoundation.utils.helper.TransformationHelper; import org.jboss.resteasy.annotations.jaxrs.HeaderParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/eclipsefoundation/git/eca/resource/ReportsResource.java b/src/main/java/org/eclipsefoundation/git/eca/resource/ReportsResource.java index 90c37e366213623ee4fe8c5517a1b0446fd40ea9..f96e79fadcb402f5dd038094ac5cde35510f0f12 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/resource/ReportsResource.java +++ b/src/main/java/org/eclipsefoundation/git/eca/resource/ReportsResource.java @@ -13,6 +13,13 @@ package org.eclipsefoundation.git.eca.resource; import java.time.LocalDate; +import org.apache.commons.lang3.StringUtils; +import org.eclipsefoundation.git.eca.config.EcaReportsConfig; +import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.git.eca.service.ReportsService; +import org.eclipsefoundation.http.model.RequestWrapper; + +import io.quarkus.security.UnauthorizedException; import jakarta.inject.Inject; import jakarta.ws.rs.BadRequestException; import jakarta.ws.rs.GET; @@ -20,13 +27,6 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Response; -import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.exception.UnauthorizedException; -import org.eclipsefoundation.core.model.RequestWrapper; -import org.eclipsefoundation.git.eca.config.EcaReportsConfig; -import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; -import org.eclipsefoundation.git.eca.service.ReportsService; - @Path("/reports") public class ReportsResource { @Inject diff --git a/src/main/java/org/eclipsefoundation/git/eca/resource/ValidationResource.java b/src/main/java/org/eclipsefoundation/git/eca/resource/ValidationResource.java index a32f36b7c8261315e1f5a6d662c6cb63dfe3da4d..8416d25bf8c12f4fac46f63d516f40c8ce446e00 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/resource/ValidationResource.java +++ b/src/main/java/org/eclipsefoundation/git/eca/resource/ValidationResource.java @@ -17,15 +17,15 @@ import java.util.List; import java.util.Objects; import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.exception.FinalForbiddenException; -import org.eclipsefoundation.core.helper.TransformationHelper; -import org.eclipsefoundation.core.service.CachingService; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.git.eca.api.models.EclipseUser; import org.eclipsefoundation.git.eca.helper.ProjectHelper; import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.model.ValidationResponse; import org.eclipsefoundation.git.eca.namespace.APIStatusCode; import org.eclipsefoundation.git.eca.service.ValidationService; +import org.eclipsefoundation.utils.exception.FinalForbiddenException; +import org.eclipsefoundation.utils.helper.TransformationHelper; import org.jboss.resteasy.annotations.jaxrs.QueryParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/eclipsefoundation/git/eca/resource/WebhooksResource.java b/src/main/java/org/eclipsefoundation/git/eca/resource/WebhooksResource.java index c84c646a2e865aac140fee0bc2dea599af54c943..a53f253fe6d4ea35e8a4b39f22e7fbb95cc403a9 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/resource/WebhooksResource.java +++ b/src/main/java/org/eclipsefoundation/git/eca/resource/WebhooksResource.java @@ -11,16 +11,11 @@ **********************************************************************/ package org.eclipsefoundation.git.eca.resource; -import jakarta.inject.Inject; -import jakarta.ws.rs.POST; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.core.Response; - -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.api.models.SystemHook; import org.eclipsefoundation.git.eca.namespace.EventType; import org.eclipsefoundation.git.eca.namespace.WebhookHeaders; import org.eclipsefoundation.git.eca.service.SystemHookService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.jboss.resteasy.annotations.jaxrs.HeaderParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,6 +23,11 @@ import org.slf4j.LoggerFactory; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.inject.Inject; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; + @Path("webhooks/gitlab") public class WebhooksResource { private static final Logger LOGGER = LoggerFactory.getLogger(WebhooksResource.class); diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/ReportsService.java b/src/main/java/org/eclipsefoundation/git/eca/service/ReportsService.java index 83dbecb44f8c988449d28e98ea80e633dae2f101..22d4783243d671e16ddd44950f849e19857bdd45 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/ReportsService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/ReportsService.java @@ -14,8 +14,8 @@ package org.eclipsefoundation.git.eca.service; import java.time.LocalDate; import java.util.List; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.model.PrivateProjectData; +import org.eclipsefoundation.http.model.RequestWrapper; /** * This interface provides the means to get list of desired entities from the DB diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/SystemHookService.java b/src/main/java/org/eclipsefoundation/git/eca/service/SystemHookService.java index 3ddab46e18020a1add565b1d7a2f3be9e2cf63ec..cadc5d4a0576a048b7feaeb41dcc14d391323d99 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/SystemHookService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/SystemHookService.java @@ -11,8 +11,8 @@ **********************************************************************/ package org.eclipsefoundation.git.eca.service; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.api.models.SystemHook; +import org.eclipsefoundation.http.model.RequestWrapper; /** * Processes the various system hooks received. diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/ValidationService.java b/src/main/java/org/eclipsefoundation/git/eca/service/ValidationService.java index dc75ec9a3f32ec8cee279c8adba780338f12bec2..437676dd53a3f6dd97e548fa74d603421482aa38 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/ValidationService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/ValidationService.java @@ -11,9 +11,9 @@ **********************************************************************/ package org.eclipsefoundation.git.eca.service; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.model.ValidationResponse; +import org.eclipsefoundation.http.model.RequestWrapper; /** * Service containing logic for validating commits. diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/ValidationStatusService.java b/src/main/java/org/eclipsefoundation/git/eca/service/ValidationStatusService.java index 193f5455d2a6f9268fd9dca322b84b04f1047cc9..dbe44cd5aff1c6237a4d1651c891863bf1eedd1d 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/ValidationStatusService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/ValidationStatusService.java @@ -13,11 +13,11 @@ package org.eclipsefoundation.git.eca.service; import java.util.List; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.efservices.api.models.Project; import org.eclipsefoundation.git.eca.dto.CommitValidationStatus; import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.model.ValidationResponse; +import org.eclipsefoundation.http.model.RequestWrapper; /** * Interface for retrieving/updating validation statuses. diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/CachedUserService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/CachedUserService.java index e82ea8a31c9fd7a2e2acd9eba8d69669e7440e55..27fdb5733dd7290cf481234cee52c2f16d9a9f24 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/CachedUserService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/CachedUserService.java @@ -19,8 +19,8 @@ import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.eclipsefoundation.core.model.CacheWrapper; -import org.eclipsefoundation.core.service.CachingService; +import org.eclipsefoundation.caching.model.CacheWrapper; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.efservices.api.models.Project; import org.eclipsefoundation.efservices.services.DrupalTokenService; import org.eclipsefoundation.git.eca.api.AccountsAPI; diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java index 2f8eb3ae1154dc157a4ed1a6367388b3d4bd74db..82ae77563e6a2113a9e0385d14d5fcb5b74a375d 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultGithubApplicationService.java @@ -19,19 +19,11 @@ import java.util.List; import java.util.Optional; import java.util.concurrent.TimeUnit; -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.inject.Inject; -import jakarta.ws.rs.core.MultivaluedMap; - import org.eclipse.microprofile.config.inject.ConfigProperty; import org.eclipse.microprofile.context.ManagedExecutor; import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.eclipsefoundation.core.exception.ApplicationException; -import org.eclipsefoundation.core.model.FlatRequestWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.core.service.APIMiddleware; -import org.eclipsefoundation.core.service.CachingService; import org.eclipsefoundation.git.eca.api.GithubAPI; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.PullRequest; import org.eclipsefoundation.git.eca.config.WebhooksConfig; @@ -39,6 +31,9 @@ import org.eclipsefoundation.git.eca.dto.GithubApplicationInstallation; import org.eclipsefoundation.git.eca.helper.JwtHelper; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.service.GithubApplicationService; +import org.eclipsefoundation.http.exception.ApplicationException; +import org.eclipsefoundation.http.model.FlatRequestWrapper; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; @@ -49,6 +44,11 @@ import org.slf4j.LoggerFactory; import com.github.benmanes.caffeine.cache.AsyncLoadingCache; import com.github.benmanes.caffeine.cache.Caffeine; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.MultivaluedMap; + /** * Default caching implementation of the GH app service. This uses a loading cache to keep installation info highly * available to reduce latency in calls. diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultReportsService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultReportsService.java index ea37c34f36f86e39dc6271e260586d78d5918b31..fef0c3c52cc2fa2bbb05d6ef3e7f6ab9aef8dd9f 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultReportsService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultReportsService.java @@ -16,12 +16,12 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.dto.PrivateProjectEvent; import org.eclipsefoundation.git.eca.model.PrivateProjectData; import org.eclipsefoundation.git.eca.model.mappers.PrivateProjectEventMapper; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.service.ReportsService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultSystemHookService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultSystemHookService.java index ce00dfc88d29496f7b6fa2722948b6661872e511..9dc585a263e79def4f0db3c14069eda30f023656 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultSystemHookService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultSystemHookService.java @@ -19,19 +19,10 @@ import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.PreDestroy; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.context.control.ActivateRequestContext; -import jakarta.inject.Inject; -import jakarta.transaction.Transactional; -import jakarta.ws.rs.core.MultivaluedMap; - import org.eclipse.microprofile.config.inject.ConfigProperty; import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.eclipsefoundation.core.model.CacheWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; -import org.eclipsefoundation.core.service.CachingService; +import org.eclipsefoundation.caching.model.CacheWrapper; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.git.eca.api.GitlabAPI; import org.eclipsefoundation.git.eca.api.models.GitlabProjectResponse; import org.eclipsefoundation.git.eca.api.models.GitlabUserResponse; @@ -39,6 +30,7 @@ import org.eclipsefoundation.git.eca.api.models.SystemHook; import org.eclipsefoundation.git.eca.dto.PrivateProjectEvent; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.service.SystemHookService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; @@ -46,6 +38,14 @@ import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.control.ActivateRequestContext; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import jakarta.ws.rs.core.MultivaluedMap; + @ApplicationScoped @ActivateRequestContext public class DefaultSystemHookService implements SystemHookService { diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationService.java index 0e03e739fe8e851b85efdd1e74afeb512ccc9951..bc5a096c98d0cad912c4d99a827d0a234658df6c 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationService.java @@ -15,7 +15,6 @@ import java.util.List; import java.util.Optional; import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.efservices.api.models.Project; import org.eclipsefoundation.git.eca.api.models.EclipseUser; import org.eclipsefoundation.git.eca.config.MailValidationConfig; @@ -30,6 +29,7 @@ import org.eclipsefoundation.git.eca.namespace.APIStatusCode; import org.eclipsefoundation.git.eca.service.UserService; import org.eclipsefoundation.git.eca.service.ValidationService; import org.eclipsefoundation.git.eca.service.ValidationStatusService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusService.java b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusService.java index 8b7ce63f9a9cac7430acbe26581547ef567505c4..b3ec1d827206464d0c0a59dbbf063814e4314f28 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusService.java +++ b/src/main/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusService.java @@ -15,15 +15,13 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map.Entry; +import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap.KeySetView; import java.util.function.Function; import java.util.function.Predicate; -import java.util.Optional; import org.apache.commons.lang3.StringUtils; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.efservices.api.models.Project; import org.eclipsefoundation.git.eca.dto.CommitValidationMessage; import org.eclipsefoundation.git.eca.dto.CommitValidationStatus; @@ -35,9 +33,11 @@ import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.model.ValidationResponse; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.service.ValidationStatusService; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; +import org.eclipsefoundation.utils.helper.DateTimeHelper; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java index 0703090e0230a2e89786aba165195405e00ff405..0a6cda1462f1b127ddc2fe74d95038d85e345ff3 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java +++ b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubInstallationUpdateTask.java @@ -18,9 +18,6 @@ import java.util.List; import org.apache.maven.shared.utils.StringUtils; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.core.model.FlatRequestWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.core.service.APIMiddleware; import org.eclipsefoundation.git.eca.api.GithubAPI; import org.eclipsefoundation.git.eca.api.models.GithubApplicationInstallationData; @@ -28,9 +25,12 @@ import org.eclipsefoundation.git.eca.config.WebhooksConfig; import org.eclipsefoundation.git.eca.dto.GithubApplicationInstallation; import org.eclipsefoundation.git.eca.helper.JwtHelper; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.http.model.FlatRequestWrapper; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; +import org.eclipsefoundation.utils.helper.DateTimeHelper; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java index 59f6dd80b6fd569a61c37a21c0af96f3697bd1cc..af73d060dc0672f9ade27bb3a3b6771ead5227cf 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java +++ b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java @@ -15,30 +15,29 @@ import java.net.URI; import java.util.Arrays; import java.util.List; -import jakarta.annotation.PostConstruct; -import jakarta.enterprise.context.ApplicationScoped; -import jakarta.enterprise.context.control.ActivateRequestContext; -import jakarta.enterprise.inject.Instance; -import jakarta.inject.Inject; -import jakarta.ws.rs.core.MultivaluedMap; - import org.eclipse.microprofile.config.inject.ConfigProperty; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.core.model.FlatRequestWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; -import org.eclipsefoundation.core.namespace.DefaultUrlParameterNames; import org.eclipsefoundation.git.eca.dto.GithubWebhookTracking; import org.eclipsefoundation.git.eca.helper.GithubValidationHelper; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.http.model.FlatRequestWrapper; +import org.eclipsefoundation.http.model.RequestWrapper; +import org.eclipsefoundation.http.namespace.DefaultUrlParameterNames; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.namespace.PersistenceUrlParameterNames; import org.eclipsefoundation.persistence.service.FilterService; +import org.eclipsefoundation.utils.helper.DateTimeHelper; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.quarkus.scheduler.Scheduled; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.control.ActivateRequestContext; +import jakarta.enterprise.inject.Instance; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.MultivaluedMap; /** * Scheduled regular task that will interact with the backend persistence to look for requests that are in a diff --git a/src/main/java/org/eclipsefoundation/git/eca/tasks/ScheduledPrivateProjectScanTask.java b/src/main/java/org/eclipsefoundation/git/eca/tasks/ScheduledPrivateProjectScanTask.java index a31cba0863751f63b097b903b801881bacce2a3b..f5f1d73b80011dd312c096f0329078efa34607a1 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/tasks/ScheduledPrivateProjectScanTask.java +++ b/src/main/java/org/eclipsefoundation/git/eca/tasks/ScheduledPrivateProjectScanTask.java @@ -18,15 +18,15 @@ import java.util.Optional; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.eclipse.microprofile.rest.client.inject.RestClient; -import org.eclipsefoundation.core.model.FlatRequestWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.core.service.APIMiddleware; -import org.eclipsefoundation.core.service.CachingService; import org.eclipsefoundation.git.eca.api.GitlabAPI; import org.eclipsefoundation.git.eca.api.models.GitlabProjectResponse; import org.eclipsefoundation.git.eca.api.models.GitlabUserResponse; import org.eclipsefoundation.git.eca.dto.PrivateProjectEvent; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; +import org.eclipsefoundation.http.model.FlatRequestWrapper; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.impl.DefaultHibernateDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; @@ -50,11 +50,9 @@ public class ScheduledPrivateProjectScanTask { @ConfigProperty(name = "eclipse.scheduled.private-project.enabled", defaultValue = "true") Instance<Boolean> enabled; - @ConfigProperty(name = "eclipse.gitlab.access-token") String apiToken; - @Inject @RestClient GitlabAPI api; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f40b05a96e5e03284274971f812e842d1fb2e0d4..b7e2df0450b37debc043b06e2dc49f38a45f2f04 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,6 +2,7 @@ quarkus.http.enable-compression=true quarkus.http.port=8080 quarkus.http.root-path=/git +quarkus.micrometer.enabled=true ## RestClient configs org.eclipsefoundation.git.eca.api.AccountsAPI/mp-rest/url=https://api.eclipse.org diff --git a/src/test/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResourceTest.java b/src/test/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResourceTest.java index bb5ae16a6071aa55ea3b0bf66e23ee83c9aee58b..1c3aa8ad0d9c58c72d85be438ef3c70e0ea80e39 100644 --- a/src/test/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResourceTest.java +++ b/src/test/java/org/eclipsefoundation/git/eca/resource/GithubWebhooksResourceTest.java @@ -14,15 +14,13 @@ package org.eclipsefoundation.git.eca.resource; import java.util.Map; import java.util.Optional; -import jakarta.inject.Inject; - -import org.eclipsefoundation.core.exception.ApplicationException; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.Installation; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.PullRequest; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.PullRequestHead; import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.Repository; import org.eclipsefoundation.git.eca.namespace.WebhookHeaders; +import org.eclipsefoundation.http.exception.ApplicationException; import org.eclipsefoundation.testing.helpers.TestCaseHelper; import org.eclipsefoundation.testing.models.EndpointTestBuilder; import org.junit.jupiter.api.Test; @@ -30,6 +28,7 @@ import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.ObjectMapper; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; @QuarkusTest class GithubWebhooksResourceTest { diff --git a/src/test/java/org/eclipsefoundation/git/eca/resource/ValidationResourceTest.java b/src/test/java/org/eclipsefoundation/git/eca/resource/ValidationResourceTest.java index ba26d06fb6c1b6af6197f98c38e4ef6f43ad0b35..1a2931c882d26e72ca5e6842f944697cffc87c34 100644 --- a/src/test/java/org/eclipsefoundation/git/eca/resource/ValidationResourceTest.java +++ b/src/test/java/org/eclipsefoundation/git/eca/resource/ValidationResourceTest.java @@ -23,14 +23,14 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import org.eclipsefoundation.core.exception.ApplicationException; -import org.eclipsefoundation.core.service.CachingService; +import org.eclipsefoundation.caching.service.CachingService; import org.eclipsefoundation.git.eca.model.Commit; import org.eclipsefoundation.git.eca.model.GitUser; import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.namespace.APIStatusCode; import org.eclipsefoundation.git.eca.namespace.ProviderType; import org.eclipsefoundation.git.eca.test.namespaces.SchemaNamespaceHelper; +import org.eclipsefoundation.http.exception.ApplicationException; import org.eclipsefoundation.testing.helpers.AuthHelper; import org.eclipsefoundation.testing.helpers.TestCaseHelper; import org.eclipsefoundation.testing.models.EndpointTestBuilder; diff --git a/src/test/java/org/eclipsefoundation/git/eca/resource/WebhooksResourceTest.java b/src/test/java/org/eclipsefoundation/git/eca/resource/WebhooksResourceTest.java index 295ba3ad020c23496b3e8058eff669002ffa1779..da50e22e8bd14afcc2b7c97a94cf2f7efe7ff47d 100644 --- a/src/test/java/org/eclipsefoundation/git/eca/resource/WebhooksResourceTest.java +++ b/src/test/java/org/eclipsefoundation/git/eca/resource/WebhooksResourceTest.java @@ -16,13 +16,10 @@ import java.util.Arrays; import java.util.Map; import java.util.Optional; -import jakarta.inject.Inject; - -import org.eclipsefoundation.core.exception.ApplicationException; import org.eclipsefoundation.git.eca.api.models.SystemHook; import org.eclipsefoundation.git.eca.api.models.SystemHook.Owner; +import org.eclipsefoundation.http.exception.ApplicationException; import org.eclipsefoundation.testing.helpers.TestCaseHelper; - import org.eclipsefoundation.testing.models.EndpointTestBuilder; import org.eclipsefoundation.testing.models.EndpointTestCase; import org.junit.jupiter.api.Test; @@ -30,6 +27,7 @@ import org.junit.jupiter.api.Test; import com.fasterxml.jackson.databind.ObjectMapper; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; @QuarkusTest class WebhooksResourceTest { diff --git a/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationServiceTest.java b/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationServiceTest.java index b64fbae925f5a79a9a6c9fd97e9915d2bdb3d237..7be8a66a4ab119b6a0cbf795282290b7c2fb1982 100644 --- a/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationServiceTest.java +++ b/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationServiceTest.java @@ -5,9 +5,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import org.eclipsefoundation.core.helper.DateTimeHelper; -import org.eclipsefoundation.core.model.FlatRequestWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.dto.CommitValidationStatus; import org.eclipsefoundation.git.eca.model.Commit; import org.eclipsefoundation.git.eca.model.GitUser; @@ -16,9 +13,12 @@ import org.eclipsefoundation.git.eca.model.ValidationResponse; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.namespace.ProviderType; import org.eclipsefoundation.git.eca.service.ValidationService; +import org.eclipsefoundation.http.model.FlatRequestWrapper; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; +import org.eclipsefoundation.utils.helper.DateTimeHelper; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusServiceTest.java b/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusServiceTest.java index 05ea65f0d67026f0db497910b83b67660144e4fa..1fa8ad4cda0ffa9c29975c62c4394d046149150a 100644 --- a/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusServiceTest.java +++ b/src/test/java/org/eclipsefoundation/git/eca/service/impl/DefaultValidationStatusServiceTest.java @@ -17,8 +17,6 @@ import java.util.Collections; import java.util.List; import java.util.UUID; -import org.eclipsefoundation.core.model.FlatRequestWrapper; -import org.eclipsefoundation.core.model.RequestWrapper; import org.eclipsefoundation.git.eca.dto.CommitValidationStatus; import org.eclipsefoundation.git.eca.model.Commit; import org.eclipsefoundation.git.eca.model.GitUser; @@ -26,6 +24,8 @@ import org.eclipsefoundation.git.eca.model.ValidationRequest; import org.eclipsefoundation.git.eca.namespace.GitEcaParameterNames; import org.eclipsefoundation.git.eca.namespace.ProviderType; import org.eclipsefoundation.git.eca.service.ValidationStatusService; +import org.eclipsefoundation.http.model.FlatRequestWrapper; +import org.eclipsefoundation.http.model.RequestWrapper; import org.eclipsefoundation.persistence.dao.PersistenceDao; import org.eclipsefoundation.persistence.model.RDBMSQuery; import org.eclipsefoundation.persistence.service.FilterService; diff --git a/src/test/java/org/eclipsefoundation/git/eca/test/api/MockProjectsAPI.java b/src/test/java/org/eclipsefoundation/git/eca/test/api/MockProjectsAPI.java index 1f30d3a5ca827cf8b488354049ca359bb1f9db27..60229fea9c2c0caff320efad0341ac2d6bbd0f6a 100644 --- a/src/test/java/org/eclipsefoundation/git/eca/test/api/MockProjectsAPI.java +++ b/src/test/java/org/eclipsefoundation/git/eca/test/api/MockProjectsAPI.java @@ -77,7 +77,6 @@ public class MockProjectsAPI implements ProjectsAPI { .setTags(Collections.emptyList()) .setGithub(GithubProject.builder().setOrg("").setIgnoredRepos(Collections.emptyList()).build()) .setContributors(Collections.emptyList()) - .setWorkingGroups(Collections.emptyList()) .setIndustryCollaborations(Collections.emptyList()) .setReleases(Collections.emptyList()) .setTopLevelProject("eclipse") @@ -107,7 +106,6 @@ public class MockProjectsAPI implements ProjectsAPI { .setTags(Collections.emptyList()) .setGithub(GithubProject.builder().setOrg("").setIgnoredRepos(Collections.emptyList()).build()) .setContributors(Collections.emptyList()) - .setWorkingGroups(Collections.emptyList()) .setIndustryCollaborations(Collections.emptyList()) .setReleases(Collections.emptyList()) .setTopLevelProject("eclipse") @@ -126,7 +124,6 @@ public class MockProjectsAPI implements ProjectsAPI { .setIgnoredSubGroups(Arrays.asList("eclipse/dash/mirror")) .setProjectGroup("eclipse/dash") .build()) - .setGitlabRepos(Arrays.asList(Repo.builder().setUrl("http://www.gitlab.eclipse.org/eclipsefdn/sample/repo").build())) .setCommitters(Arrays.asList(u1, u2)) .setProjectLeads(Collections.emptyList()) .setShortProjectId("spec.proj") @@ -142,7 +139,6 @@ public class MockProjectsAPI implements ProjectsAPI { .setIgnoredRepos(Arrays.asList("eclipsefdn-tck/tck-ignored")) .build()) .setContributors(Collections.emptyList()) - .setWorkingGroups(Collections.emptyList()) .setIndustryCollaborations(Collections.emptyList()) .setReleases(Collections.emptyList()) .setTopLevelProject("eclipse")