sonar-gitlab-plugin icon indicating copy to clipboard operation
sonar-gitlab-plugin copied to clipboard

sonar-gitlab-plugin-4.1.0-SNAPSHOT artifact is badly generated

Open angelusGJ opened this issue 5 years ago • 0 comments

The plugins is always getting the issues of master branch and not de PR branch. But after many tests, I have realized the artifact is badly generated. This provokes the error in #243.

I have debugged the plugin and I have seen that the branch is not set although the branch is not null. The searchIssues method of SonarFacade class is the problem. In the original artifact the branch is not been set. It's like the lines where the branch is set had been removed in the artifact version. But if you see the tagged source code, it is indeed set.

private Issues.SearchWsResponse searchIssues(String componentKey, String branch, int page) { SearchRequest searchRequest = new SearchRequest().setComponentKeys(Collections.singletonList(componentKey)).setP(String.valueOf(page)).setResolved("false"); if (isNotBlankAndNotEmpty(branch)) { searchRequest.setBranch(branch); } return wsClient.issues().search(searchRequest); }

I don't know how the artifact was generated but I have compiled the artifact from the source code from 4.1.0-SNAPSHOT tag and the plugin works.

The artifact should be generated again to fix de problem.

angelusGJ avatar Dec 10 '19 09:12 angelusGJ