Access to PR decoration API

Hi SQ team,

We are maintaining the sonar-gerrit-plugin which act as a PR decorator for issue-mode analysis of gerrit PR.
It works fine for SQ <=7.6 but, as issue/preview mode has been dropped in 7.7, it obviously fails with this latest release.

Most of our daily work is based on gerrit PR decoration and its go/no-go label function.
Thus, we are screwed.

So we are looking at the paid version of SQ to gain access to the PR feature.
But as we rely on gerrit and that only github and vsts PR decoration are officially supported, my questions are :drum: :drum: :drum: :

  • is the PR decoration API open to plugin developers using a paid version ?
  • if yes, does the additional 15k€ support contract is required to access its documentation ?
  • if no, as a last resort, would you take over the plugin maintenance to officially add it to the plugin list ?

Thanks,
1010

1 Like

Hi Mildis,

  • is the PR decoration API open to plugin developers using a paid version?

There is no plugin API for PR decoration. Support of each ALM is added directly in our commercial editions.

  • if no, as a last resort, would you take over the plugin maintenance to officially add it to the plugin list?

That’s not in our short term roadmap. Due to our limited bandwidth, we have to limit our efforts to most popular ALM, sorry.

A way for you to build an integration with Gerrit would be to use webhooks to notify an external system each time a PR is analyzed in SonarQube or when quality gate is updated, and then use SonarQube web API to query the information you need to decorate your review. Let me know if you need more details on this solution.

2 Likes

Thanks Julien for your answer.

I though gerrit was popular enough along with SQ and Jenkins as a perfect trio for on-premise CI/CD but I might be wrong.

Regarding the webhook solution, it seems that the payload only informs about QualityGate status but not detailed issues. Is it correct ?
It could do the job but with far less interest than what we are used to now (inline code annotation of detected issues).

I though gerrit was popular enough along with SQ and Jenkins as a perfect trio for on-premise CI/CD but I might be wrong.

We gave a look at our marketplace stats and the gerrit plugin has quite low installation count.

Regarding the webhook solution, it seems that the payload only informs about QualityGate status but not detailed issues. Is it correct ?

The webhook payload will indeed not contain all issues, but you might be able to query issues using WS calls (for example api/issues/search).

1 Like

True, regarding the downloads count on github. Also interesting that you are aware of locally-installed plugins even those not available directly in the marketplace.

We will give a try to that solution.

In fact my sentence was wrong. The numbers we looked at are the one coming from telemetry:

So that should include manual installations, but excluding people having disabled telemetry.

Understood.
Thanks for the update.

Hi Mildis,

We are using gerrit as well and running into the same issue. I was wondering if you have found a solution to the problem? thank you!