diff --git a/.gitignore b/.gitignore index 2b301a7..28e8642 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ target *~ sdk .okhttpcache +.idea +*.iml diff --git a/CHANGELOG.md b/CHANGELOG.md index 058dc52..b6c0710 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ Changelog of Simple Bitbucket Commit Checker. +## Unreleased +### GitHub [#79](https://github.com/tomasbjerre/simple-bitbucket-commit-checker/issues/79) JQL does not work, Bitbucket v5.4.0 + Debug loggin in Jira client + + [e1b897c48cf0b08](https://github.com/tomasbjerre/simple-bitbucket-commit-checker/commit/e1b897c48cf0b08) Tomas Bjerre *2017-11-05 08:23:22* + +### No issue + Doc + + [89fec3e10e4d153](https://github.com/tomasbjerre/simple-bitbucket-commit-checker/commit/89fec3e10e4d153) Tomas Bjerre *2017-09-08 15:22:56* + ## 3.9 ### GitHub [#76](https://github.com/tomasbjerre/simple-bitbucket-commit-checker/issues/76) Unable to push notes when sbcc plugin is enabled Ignoring notes diff --git a/src/main/java/se/bjurr/sbcc/JiraClient.java b/src/main/java/se/bjurr/sbcc/JiraClient.java index e994b99..eec6d1f 100644 --- a/src/main/java/se/bjurr/sbcc/JiraClient.java +++ b/src/main/java/se/bjurr/sbcc/JiraClient.java @@ -13,8 +13,12 @@ import com.google.common.annotations.VisibleForTesting; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JiraClient { + private Logger logger = LoggerFactory.getLogger(JiraClient.class); + public int getNumberOfJqlResults( ApplicationLinkService applicationLinkService, String jqlCheckQuery) throws CredentialsRequiredException, UnsupportedEncodingException, ResponseException { @@ -30,10 +34,14 @@ public int getNumberOfJqlResults( @VisibleForTesting protected String invokeJira(ApplicationLinkService applicationLinkService, String jqlCheckQuery) throws UnsupportedEncodingException, ResponseException, CredentialsRequiredException { - return applicationLinkService - .getPrimaryApplicationLink(JiraApplicationType.class) - .createAuthenticatedRequestFactory() - .createRequest(GET, "/rest/api/2/search?jql=" + encode(jqlCheckQuery, UTF_8.name())) - .execute(); + String restPath = "/rest/api/2/search?jql=" + encode(jqlCheckQuery, UTF_8.name()); + String json = + applicationLinkService + .getPrimaryApplicationLink(JiraApplicationType.class) + .createAuthenticatedRequestFactory() + .createRequest(GET, restPath) + .execute(); + logger.debug(restPath + "\n\n <<< " + json); + return json; } }