From d174341bbfb6fadbe6ad918eb2c16ea31ed9e5b0 Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 09:28:27 +0200 Subject: [PATCH 01/18] fix: adjust proxy implementation --- .../com/whatsapp/api/WhatsappApiServiceGenerator.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java index 240eb7fa7..a0f9fe33f 100644 --- a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java +++ b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java @@ -58,7 +58,7 @@ private WhatsappApiServiceGenerator() { * *

* @param host the host (Not null) - * @param port the port (Not null) + * @param port the port * @param username the username * @param pwd the pwd * @see Proxy Selector @@ -66,13 +66,14 @@ private WhatsappApiServiceGenerator() { */ public static void setHttpProxy(String host, int port, String username, String pwd) { Objects.requireNonNull(host, "Host cannot be null"); - Objects.requireNonNull(port, "Http Port cannot be null"); CustomHttpProxySelector proxySelector = new CustomHttpProxySelector(host, port); + sharedClient = sharedClient.newBuilder() + .proxySelector(proxySelector) + .build(); + if (username == null || pwd == null) { - sharedClient = sharedClient.newBuilder() - .proxySelector(proxySelector) - .build(); + //Without authentication return; } From b676c367a2f11b0a0981cff334e35eab07ad0985 Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 09:44:02 +0200 Subject: [PATCH 02/18] fix: add proxy object injection in shared object --- .../java/com/whatsapp/api/WhatsappApiServiceGenerator.java | 1 + .../whatsapp/api/utils/proxy/CustomHttpProxySelector.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java index a0f9fe33f..2af6e96bf 100644 --- a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java +++ b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java @@ -70,6 +70,7 @@ public static void setHttpProxy(String host, int port, String username, String p sharedClient = sharedClient.newBuilder() .proxySelector(proxySelector) + .proxy(proxySelector.getProxy()) .build(); if (username == null || pwd == null) { diff --git a/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java b/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java index de5bed1dd..33daa8e04 100644 --- a/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java +++ b/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java @@ -13,6 +13,10 @@ public class CustomHttpProxySelector extends ProxySelector { private final Proxy proxy; + public Proxy getProxy() { + return proxy; + } + public CustomHttpProxySelector(String host, int port) { this.proxy = new Proxy(Type.HTTP, new InetSocketAddress(host, port)); } @@ -26,4 +30,6 @@ public List select(URI uri) { public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { // Do something here } + + } From ebb3c977785f0d29d38b296ce8ee2da559bf4ddf Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 10:22:27 +0200 Subject: [PATCH 03/18] fix: removed proxy injection because have precedence to ProxySelector --- .../java/com/whatsapp/api/WhatsappApiServiceGenerator.java | 1 - .../com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java index 2af6e96bf..a0f9fe33f 100644 --- a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java +++ b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java @@ -70,7 +70,6 @@ public static void setHttpProxy(String host, int port, String username, String p sharedClient = sharedClient.newBuilder() .proxySelector(proxySelector) - .proxy(proxySelector.getProxy()) .build(); if (username == null || pwd == null) { diff --git a/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java b/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java index 33daa8e04..a0256c4b4 100644 --- a/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java +++ b/src/main/java/com/whatsapp/api/utils/proxy/CustomHttpProxySelector.java @@ -13,10 +13,6 @@ public class CustomHttpProxySelector extends ProxySelector { private final Proxy proxy; - public Proxy getProxy() { - return proxy; - } - public CustomHttpProxySelector(String host, int port) { this.proxy = new Proxy(Type.HTTP, new InetSocketAddress(host, port)); } From eb4780fe1e30a916393ed048a8a5011a5fe61efd Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 11:48:58 +0200 Subject: [PATCH 04/18] fix: remove authenticator to use ProxyAutenthicator like ProxySelector --- src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java index a0f9fe33f..ef480e763 100644 --- a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java +++ b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java @@ -80,7 +80,7 @@ public static void setHttpProxy(String host, int port, String username, String p CustomProxyAuthenticator proxyAuthenticator = new CustomProxyAuthenticator(username, pwd); sharedClient = sharedClient.newBuilder() - .authenticator(proxyAuthenticator) + .proxyAuthenticator(proxyAuthenticator) .build(); } From dd2c43fd19066e66b9dd7e5dc29368cbb60e0160 Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 11:49:18 +0200 Subject: [PATCH 05/18] fix: set credentials as final --- .../api/utils/proxy/CustomProxyAuthenticator.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java b/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java index f258ccee7..26eec8e8b 100644 --- a/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java +++ b/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java @@ -10,16 +10,20 @@ public class CustomProxyAuthenticator implements Authenticator { - private final String credential; + private final String CREDENTIALS; + + public String getCREDENTIALS() { + return CREDENTIALS; + } public CustomProxyAuthenticator(final String username, final String password) { - credential = Credentials.basic(username, password); + CREDENTIALS = Credentials.basic(username, password); } @Override public Request authenticate(final Route route, final Response response) throws IOException { return response.request().newBuilder() - .header("Proxy-Authorization", credential) + .header("Proxy-Authorization", CREDENTIALS) .build(); } } From f8b18d9d51967d5d3ef43a94fd477095e8153d35 Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 12:21:57 +0200 Subject: [PATCH 06/18] fix: add test for proxy integration --- .../api/WhatsappApiServiceGenerator.java | 5 +- .../api/WhatsappApiServiceGeneratorTest.java | 119 ++++++++++++++++++ 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/whatsapp/api/WhatsappApiServiceGeneratorTest.java diff --git a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java index ef480e763..f46c52fa7 100644 --- a/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java +++ b/src/main/java/com/whatsapp/api/WhatsappApiServiceGenerator.java @@ -37,8 +37,11 @@ private WhatsappApiServiceGenerator() { } static { + sharedClient = createDefaultHttpClient(); + } - sharedClient = new OkHttpClient.Builder()// + public static OkHttpClient createDefaultHttpClient(){ + return new OkHttpClient.Builder()// .callTimeout(20, TimeUnit.SECONDS)// .pingInterval(20, TimeUnit.SECONDS)// .build(); diff --git a/src/test/java/com/whatsapp/api/WhatsappApiServiceGeneratorTest.java b/src/test/java/com/whatsapp/api/WhatsappApiServiceGeneratorTest.java new file mode 100644 index 000000000..8678205d7 --- /dev/null +++ b/src/test/java/com/whatsapp/api/WhatsappApiServiceGeneratorTest.java @@ -0,0 +1,119 @@ +package com.whatsapp.api; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + +import java.io.IOException; +import java.net.ProxySelector; +import java.net.URISyntaxException; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import com.whatsapp.api.domain.errors.WhatsappApiError; +import com.whatsapp.api.exception.WhatsappApiException; +import com.whatsapp.api.utils.proxy.CustomHttpProxySelector; +import com.whatsapp.api.utils.proxy.CustomProxyAuthenticator; + +import okhttp3.Authenticator; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.ResponseBody; +import retrofit2.Response; + +public class WhatsappApiServiceGeneratorTest extends TestUtils { + + @BeforeEach + void resetProxy() { + WhatsappApiServiceGenerator.sharedClient = WhatsappApiServiceGenerator.createDefaultHttpClient(); + } + + /** + * Method under test: + * {@link WhatsappApiServiceGenerator#getSharedClient} + */ + @Test + void testGetSharedClient() { + + assertNotNull(WhatsappApiServiceGenerator.getSharedClient(), "Shared client should not be null"); + assertEquals(WhatsappApiServiceGenerator.getSharedClient().getClass(), OkHttpClient.class, "Shared client should be OkHttpClient"); + + } + + /** + * Method under test: + * {@link WhatsappApiServiceGenerator#getWhatsappApiError} + * + * @throws IOException + * @throws URISyntaxException + * @throws WhatsappApiException + */ + @Test + void testGetWhatsappApiError() throws IOException, URISyntaxException { + + String verifyCodeErrorBody = fromResource("/phone/verifyCodeError.json"); + + Response response = Response.error(400, ResponseBody.create(verifyCodeErrorBody, MediaType.parse("application/json"))); + WhatsappApiError apiError = WhatsappApiServiceGenerator.getWhatsappApiError(response); + + assertEquals(136025, apiError.error().code(), "Error code should be 136025"); + assertEquals(2388093, apiError.error().errorSubcode(), "Error code should be 136025"); + assertEquals(false, apiError.error().isTransient(), "Error code should be 136025"); + assertEquals("O c\u00F3digo inserido est\u00E1 incorreto.", apiError.error().errorUserMsg(), "Error code should be 136025"); + assertEquals("N\u00E3o foi poss\u00EDvel verificar o c\u00F3digo", apiError.error().errorUserSubtitle(), "Error code should be 136025"); + + } + + /** + * Method under test: + * {@link WhatsappApiServiceGenerator#setHttpProxy(String, int, String, String)} + */ + @Test + void testSetHttpProxy_WithoutAuthentication() { + + // Pre-condition Proxy + assertNull(WhatsappApiServiceGenerator.getSharedClient().proxy(), "Proxy should be null"); + assertEquals(ProxySelector.getDefault(), WhatsappApiServiceGenerator.getSharedClient().proxySelector(), + "Proxy selector should be null"); + + // Set proxy in shared client + WhatsappApiServiceGenerator.setHttpProxy("localhost", 8080, null, null); + + // Check if proxy is set + assertNotNull(WhatsappApiServiceGenerator.getSharedClient().proxySelector(), "Proxy selector should not be null"); + assertEquals(WhatsappApiServiceGenerator.getSharedClient().proxySelector().getClass(), CustomHttpProxySelector.class, "Proxy selector should be CustomHttpProxySelector"); + + // Check if authenticator is NONE + assertEquals(Authenticator.NONE, WhatsappApiServiceGenerator.getSharedClient().authenticator(), "Authenticator should be NONE"); + } + + /** + * Method under test: + * {@link WhatsappApiServiceGenerator#setHttpProxy(String, int, String, String)} + */ + @Test + void testSetHttpProxy_WithAuthentication() { + + // Pre-condition Proxy + assertNull(WhatsappApiServiceGenerator.getSharedClient().proxy(), "Proxy should be null"); + assertEquals(ProxySelector.getDefault(), WhatsappApiServiceGenerator.getSharedClient().proxySelector(), + "Proxy selector should be ProxySelector.getDefault()"); + + // Pre-condition Authenticator + assertEquals(Authenticator.NONE, WhatsappApiServiceGenerator.getSharedClient().authenticator(), "Authenticator should be NONE"); + assertEquals(Authenticator.NONE, WhatsappApiServiceGenerator.getSharedClient().proxyAuthenticator(), "Authenticator should be NONE"); + + // Set proxy with Authentication in shared client + WhatsappApiServiceGenerator.setHttpProxy("localhost", 8080, "Proxy-User", "Proxy-Pwd"); + + // Check if proxy is set + assertNotNull(WhatsappApiServiceGenerator.getSharedClient().proxySelector(), "Proxy selector should not be null"); + assertEquals(WhatsappApiServiceGenerator.getSharedClient().proxySelector().getClass(), CustomHttpProxySelector.class, "Proxy selector should be CustomHttpProxySelector"); + + // Check if authenticator is CustomProxyAuthenticator + assertNotNull(WhatsappApiServiceGenerator.getSharedClient().proxyAuthenticator(), "Proxy Authenticator should not be null"); + assertEquals(CustomProxyAuthenticator.class, WhatsappApiServiceGenerator.getSharedClient().proxyAuthenticator().getClass(), "Authenticator should be CustomProxyAuthenticator"); + + } +} From cf735496c9f3a046d69c7e9fe2a28479d1f4ca93 Mon Sep 17 00:00:00 2001 From: Giuseppe Compierchio Date: Tue, 5 Sep 2023 12:55:24 +0200 Subject: [PATCH 07/18] fix: remove credentials --- .../whatsapp/api/utils/proxy/CustomProxyAuthenticator.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java b/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java index 26eec8e8b..610102cbc 100644 --- a/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java +++ b/src/main/java/com/whatsapp/api/utils/proxy/CustomProxyAuthenticator.java @@ -12,10 +12,6 @@ public class CustomProxyAuthenticator implements Authenticator { private final String CREDENTIALS; - public String getCREDENTIALS() { - return CREDENTIALS; - } - public CustomProxyAuthenticator(final String username, final String password) { CREDENTIALS = Credentials.basic(username, password); } From e0d7fcebddd4ea434170b4b78674a0c28b9dd9b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:33:54 +0000 Subject: [PATCH 08/18] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.5.0...maven-javadoc-plugin-3.6.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4a573c41..292ba4e24 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.0 17 ${project.basedir} From 4d5ec975e40c87d9ea4db3beacfd9c333a5c75a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:09:49 +0000 Subject: [PATCH 09/18] Bump org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11 Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4a573c41..46437c60c 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ org.jacoco jacoco-maven-plugin - 0.8.10 + 0.8.11 From 019830e93e4e59ff47b4609102f7e3c84092f34a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:58:16 +0000 Subject: [PATCH 10/18] Bump org.junit.jupiter.version from 5.10.0 to 5.10.1 Bumps `org.junit.jupiter.version` from 5.10.0 to 5.10.1. Updates `org.junit.jupiter:junit-jupiter-api` from 5.10.0 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.0 to 5.10.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4a573c41..d90999209 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ UTF-8 2.9.0 5.2.0 - 5.10.0 + 5.10.1 5.0.0-alpha.11 From a472db9445832f26ce71ce6469f89e7a0d5d5e7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:42:35 +0000 Subject: [PATCH 11/18] Bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/javadoc.yml | 2 +- .github/workflows/maven-ci.yml | 2 +- .github/workflows/maven-publish.yml | 2 +- .github/workflows/test-javadoc.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0abdde844..5a9440e8f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml index a5c0889b3..fbd092bdd 100644 --- a/.github/workflows/javadoc.yml +++ b/.github/workflows/javadoc.yml @@ -28,7 +28,7 @@ jobs: git config --local user.name "github-actions[bot]" git merge origin/main - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 91e4a64b0..0a672ed76 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 030351c7c..607466da9 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -17,7 +17,7 @@ jobs: packages: write steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/test-javadoc.yml b/.github/workflows/test-javadoc.yml index bb44393bb..9a9232b41 100644 --- a/.github/workflows/test-javadoc.yml +++ b/.github/workflows/test-javadoc.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' From 0524c8bbc0807bdd6922715a2e7845fee4a04830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:33:56 +0000 Subject: [PATCH 12/18] Bump actions/labeler from 4 to 5 Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](https://github.com/actions/labeler/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index ad476f722..724e40e64 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -17,6 +17,6 @@ jobs: pull-requests: write steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" From 6825bd13dcd806c1f1345c821fdf92efc03e0b2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:45:08 +0000 Subject: [PATCH 13/18] Bump github/codeql-action from 2 to 3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0abdde844..ea81eea40 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -53,7 +53,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -64,7 +64,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -78,6 +78,6 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" From 9d560a91f20f244739eef11d46ec0ce7fd14e748 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 21:45:27 +0000 Subject: [PATCH 14/18] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.5 Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.5. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.5) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b2e088ad..6ef7d1c2f 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 3.2.5 org.apache.maven.plugins From a2f1c7b0f88be49936ae410ead94ed3209d3d14b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 22:08:39 +0000 Subject: [PATCH 15/18] Bump org.apache.maven.plugins:maven-compiler-plugin Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.11.0 to 3.12.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.11.0...maven-compiler-plugin-3.12.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b2e088ad..3f64ba9ca 100644 --- a/pom.xml +++ b/pom.xml @@ -116,7 +116,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.12.1 17 17 From 5a6f383871a7546745d2f49ae3e9bf26271f4041 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 22:16:12 +0000 Subject: [PATCH 16/18] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.0 to 3.6.3 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.0 to 3.6.3. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.0...maven-javadoc-plugin-3.6.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4fda3118e..aee11f14b 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.0 + 3.6.3 17 ${project.basedir} From 60bb4f2a59b2ae3ddd46098048a1ea68bd8502e3 Mon Sep 17 00:00:00 2001 From: Mauricio Binda da Costa Date: Fri, 26 Jan 2024 19:32:37 -0300 Subject: [PATCH 17/18] downgrade codecov action - v3 --- .github/workflows/maven-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml index 0a672ed76..3aae14feb 100644 --- a/.github/workflows/maven-ci.yml +++ b/.github/workflows/maven-ci.yml @@ -26,4 +26,4 @@ jobs: run: mvn -B package --file pom.xml #coverage - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v3 From 29b3d59e47eb2dc09472824412dc4d73f5d63f43 Mon Sep 17 00:00:00 2001 From: Mauricio Binda da Costa Date: Fri, 26 Jan 2024 19:44:47 -0300 Subject: [PATCH 18/18] Update labeler.yml --- .github/labeler.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 7dccf8144..5b9828a50 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,13 +1,25 @@ tests: - - src/test/**/* + - changed-files: + - any-glob-to-any-file: 'src/test/**/*' + java: - - '**/*.java' + - changed-files: + - any-glob-to-any-file: '**/*.java' + documentation: - - '**/*.md' + - changed-files: + - any-glob-to-any-file: '**/*.md' + markdown: - - '**/*.md' + - changed-files: + - any-glob-to-any-file: '**/*.md' + github-actions: - - .github/**/* + - changed-files: + - any-glob-to-any-file: '.github/**/*' + dependencies: - - pom.xml + - changed-files: + - any-glob-to-any-file: 'pom.xml' +