Skip to content
Snippets Groups Projects

Migrate to Quarkus 3.8.6 and SDK 1.1.6

Merged Martin Lowe requested to merge malowe/auto/commons-1.1.6-update into main
25 files
+ 191
193
Compare changes
  • Side-by-side
  • Inline
Files
25
@@ -11,6 +11,17 @@
@@ -11,6 +11,17 @@
*/
*/
package org.eclipsefoundation.git.eca.api;
package org.eclipsefoundation.git.eca.api;
 
import java.util.List;
 
 
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
 
import org.eclipsefoundation.core.service.APIMiddleware.BaseAPIParameters;
 
import org.eclipsefoundation.git.eca.api.models.GithubAccessToken;
 
import org.eclipsefoundation.git.eca.api.models.GithubApplicationInstallationData;
 
import org.eclipsefoundation.git.eca.api.models.GithubCommit;
 
import org.eclipsefoundation.git.eca.api.models.GithubCommitStatusRequest;
 
import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.PullRequest;
 
import org.jboss.resteasy.reactive.RestResponse;
 
import jakarta.ws.rs.BeanParam;
import jakarta.ws.rs.BeanParam;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.HeaderParam;
@@ -18,15 +29,9 @@ import jakarta.ws.rs.POST;
@@ -18,15 +29,9 @@ import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.Produces;
 
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipsefoundation.core.service.APIMiddleware.BaseAPIParameters;
import org.eclipsefoundation.git.eca.api.models.GithubAccessToken;
import org.eclipsefoundation.git.eca.api.models.GithubCommitStatusRequest;
import org.eclipsefoundation.git.eca.api.models.GithubWebhookRequest.PullRequest;
import org.jboss.resteasy.util.HttpHeaderNames;
/**
/**
* Bindings used by the webhook logic to retrieve data about the PR to be validated.
* Bindings used by the webhook logic to retrieve data about the PR to be validated.
*
*
@@ -48,7 +53,7 @@ public interface GithubAPI {
@@ -48,7 +53,7 @@ public interface GithubAPI {
*/
*/
@GET
@GET
@Path("repos/{repoFull}/pulls/{pullNumber}")
@Path("repos/{repoFull}/pulls/{pullNumber}")
public PullRequest getPullRequest(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String bearer,
public PullRequest getPullRequest(@HeaderParam(HttpHeaders.AUTHORIZATION) String bearer,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("repoFull") String repoFull,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("repoFull") String repoFull,
@PathParam("pullNumber") int pullNumber);
@PathParam("pullNumber") int pullNumber);
@@ -63,13 +68,12 @@ public interface GithubAPI {
@@ -63,13 +68,12 @@ public interface GithubAPI {
*/
*/
@GET
@GET
@Path("repos/{repoFull}/pulls/{pullNumber}/commits")
@Path("repos/{repoFull}/pulls/{pullNumber}/commits")
public Response getCommits(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String bearer,
public RestResponse<List<GithubCommit>> getCommits(@HeaderParam(HttpHeaders.AUTHORIZATION) String bearer,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("repoFull") String repoFull,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("repoFull") String repoFull,
@PathParam("pullNumber") int pullNumber);
@PathParam("pullNumber") int pullNumber);
/**
/**
* Posts an update to the Github API, using an access token to update a given pull requests commit status, targeted
* Posts an update to the Github API, using an access token to update a given pull requests commit status, targeted using the head sha.
* using the head sha.
*
*
* @param bearer authorization header value, access token for application with access to repo
* @param bearer authorization header value, access token for application with access to repo
* @param apiVersion the version of the GH API to target when making the request
* @param apiVersion the version of the GH API to target when making the request
@@ -80,13 +84,13 @@ public interface GithubAPI {
@@ -80,13 +84,13 @@ public interface GithubAPI {
*/
*/
@POST
@POST
@Path("repos/{repoFull}/statuses/{prHeadSha}")
@Path("repos/{repoFull}/statuses/{prHeadSha}")
public Response updateStatus(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String bearer,
public Response updateStatus(@HeaderParam(HttpHeaders.AUTHORIZATION) String bearer,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("repoFull") String repoFull,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("repoFull") String repoFull,
@PathParam("prHeadSha") String prHeadSha, GithubCommitStatusRequest commitStatusUpdate);
@PathParam("prHeadSha") String prHeadSha, GithubCommitStatusRequest commitStatusUpdate);
/**
/**
* Requires a JWT bearer token for the application to retrieve installations for. Returns a list of installations for
* Requires a JWT bearer token for the application to retrieve installations for. Returns a list of installations for the given
* the given application.
* application.
*
*
* @param params the general params for requests, including pagination
* @param params the general params for requests, including pagination
* @param bearer JWT bearer token for the target application
* @param bearer JWT bearer token for the target application
@@ -94,7 +98,8 @@ public interface GithubAPI {
@@ -94,7 +98,8 @@ public interface GithubAPI {
*/
*/
@GET
@GET
@Path("app/installations")
@Path("app/installations")
public Response getInstallations(@BeanParam BaseAPIParameters params, @HeaderParam(HttpHeaderNames.AUTHORIZATION) String bearer);
public RestResponse<List<GithubApplicationInstallationData>> getInstallations(@BeanParam BaseAPIParameters params,
 
@HeaderParam(HttpHeaders.AUTHORIZATION) String bearer);
/**
/**
* Retrieves an access token for a specific installation, given the applications JWT bearer and the api version.
* Retrieves an access token for a specific installation, given the applications JWT bearer and the api version.
@@ -106,7 +111,7 @@ public interface GithubAPI {
@@ -106,7 +111,7 @@ public interface GithubAPI {
*/
*/
@POST
@POST
@Path("app/installations/{installationId}/access_tokens")
@Path("app/installations/{installationId}/access_tokens")
public GithubAccessToken getNewAccessToken(@HeaderParam(HttpHeaderNames.AUTHORIZATION) String bearer,
public GithubAccessToken getNewAccessToken(@HeaderParam(HttpHeaders.AUTHORIZATION) String bearer,
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("installationId") String installationId);
@HeaderParam("X-GitHub-Api-Version") String apiVersion, @PathParam("installationId") String installationId);
/**
/**
@@ -118,7 +123,6 @@ public interface GithubAPI {
@@ -118,7 +123,6 @@ public interface GithubAPI {
*/
*/
@GET
@GET
@Path("installation/repositories")
@Path("installation/repositories")
public Response getInstallationRepositories(@BeanParam BaseAPIParameters params,
public Response getInstallationRepositories(@BeanParam BaseAPIParameters params, @HeaderParam(HttpHeaders.AUTHORIZATION) String bearer);
@HeaderParam(HttpHeaderNames.AUTHORIZATION) String bearer);
}
}
Loading