Access to PR decoration API


(Mildis) #1

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


(Julien Henry) #2

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.


(Mildis) #3

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).


(Julien Henry) #4

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).


(Mildis) #5

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.


(Julien Henry) #6

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.


(Mildis) #7

Understood.
Thanks for the update.