Add GitHub workflow and Update dependency#10
Open
alikemalocalan wants to merge 4 commits intostitchdata:masterfrom
Open
Add GitHub workflow and Update dependency#10alikemalocalan wants to merge 4 commits intostitchdata:masterfrom
alikemalocalan wants to merge 4 commits intostitchdata:masterfrom
Conversation
|
@psantacl @cmerrick @mdelaurentis Would it be possible for you to review this request? Due to severe vulnerabilities a release with updated dependencies would be very desirable. Thank You! @alikemalocalan fyi |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the project’s build/release setup (Maven plugins, Java level, dependencies) and adds GitHub automation, while also updating the client implementation to use Java 11’s java.net.http.HttpClient and Jakarta JSON.
Changes:
- Update
pom.xmlfor Java 11, newer Maven release/publish plugins, and dependency refresh (including removing Apache HttpClient in favor of JDK HTTP client). - Add GitHub Actions CI workflows and Dependabot configuration for Maven dependencies.
- Replace previously “example” main classes with JUnit tests that exercise the same flows; add a test asserting HTTP/1.1 usage.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/com/stitchdata/client/StitchClient.java |
Switch HTTP transport to java.net.http.HttpClient, update JSON parsing, add helper for JSON content-type detection. |
src/main/java/com/stitchdata/client/StitchResponse.java |
Migrate JSON type to jakarta.json.JsonObject. |
src/main/java/com/stitchdata/client/StitchClientBuilder.java |
Formatting/type tweaks around Transit write handlers and builder build() formatting. |
src/main/java/com/stitchdata/client/Buffer.java |
Import cleanup and formatting-only changes. |
src/test/java/com/stitchdata/client/StitchClientTest.java |
Import cleanup/formatting; add test asserting client uses HTTP/1.1. |
src/test/java/com/stitchdata/client/BufferTest.java |
Import cleanup/formatting. |
src/test/java/com/stitchdata/client/SimpleExampleTest.java |
New test replacing the removed “simple example” main program flow. |
src/test/java/com/stitchdata/client/CallbackExampleTest.java |
New test replacing the removed “callback example” main program flow. |
src/main/java/com/stitchdata/client/examples/SimpleExample.java |
Removed example main program (superseded by tests). |
src/main/java/com/stitchdata/client/examples/CallbackExample.java |
Removed example main program (superseded by tests). |
pom.xml |
Update compiler level to 11; update Maven plugins; refresh dependencies (Transit, Jakarta JSON, JUnit), remove Apache HttpClient dependency. |
.github/workflows/maven.yml |
New Maven build workflow (currently restricted to master). |
.github/workflows/maven-unit-tests.yml |
New unit test workflow for Java 11/17 (currently push only). |
.github/dependabot.yml |
New Dependabot configuration for Maven. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+248
to
251
| int statusCode = response.statusCode(); | ||
| String reasonPhrase = ""; | ||
| String contentType = response.headers().firstValue("Content-Type").orElse(null); | ||
| JsonObject content = null; |
Comment on lines
233
to
+238
| StitchResponse sendToStitch(String body) throws IOException { | ||
| Request request = Request.Post(stitchUrl) | ||
| .connectTimeout(connectTimeout) | ||
| .addHeader("Authorization", "Bearer " + token) | ||
| .bodyString(body, CONTENT_TYPE); | ||
|
|
||
| HttpResponse response = request.execute().returnResponse(); | ||
| int statusCode = response.getStatusLine().getStatusCode(); | ||
| String reasonPhrase = response.getStatusLine().getReasonPhrase(); | ||
| ContentType contentType = ContentType.get(response.getEntity()); | ||
| HttpRequest request = HttpRequest.newBuilder(URI.create(stitchUrl)) | ||
| .header("Authorization", "Bearer " + token) | ||
| .header("Content-Type", CONTENT_TYPE) | ||
| .POST(HttpRequest.BodyPublishers.ofString(body, StandardCharsets.UTF_8)) | ||
| .build(); |
Comment on lines
+13
to
+15
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] |
| name: Maven Unit Tests | ||
|
|
||
| on: | ||
| push: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
This PR includes the latest two commits focused on Maven project and release configuration improvements.
What changed
pom.xml(source, javadoc, GPG signing, Nexus staging, and release flow).Why
These changes improve release reliability and maintainability of the Java Stitch Client build pipeline, while keeping runtime behavior unchanged.
QA steps
Manual QA steps:
Risks
Rollback steps