AmadeusITGroup / sonar-stash

Stash (BitBucket) plugin, a pull-request decorator which allows to integrate SonarQube violations directly into your pull-request
MIT License
165 stars 82 forks source link

Cannot approve Pull Request #187

Closed abialas closed 5 years ago

abialas commented 6 years ago

I want sonar user to approve the pull request in case there are no new blocker issues. I am passing setting via command line. However, all the time I see in logs that NOT APPROVED by user X. The parameters I am passing: -Dsonar.stash.reviewer.approval=true -Dsonar.stash.reviewer.approval.severity.threshold=BLOCKER

I am sure there are no new BLOCKER issues (I can see on the Pull Request tab). What else should I set?

t-8ch commented 6 years ago

Hi @abialas Can you provide the following information:

abialas commented 6 years ago

We are using SonarQube 6.7.2. I cannot check now the version of Sonar Stash. The command we are using:

bash gradlew sonarqube -Dsonar.analysis.mode=preview -Dsonar.stash.notification=true -Dsonar.stash.include.overview=false -Dsonar.stash.pullrequest.id=73 -Dsonar.stash.comments.reset=true -Dsonar.stash.reviewer.approval=true -Dsonar.stash.reviewer.approval.severity.threshold=BLOCKER

t-8ch commented 6 years ago

The version of sonar-stash is printed during the execution. Please also provide me with a build log. The best approach would be to test it with a brand new simple project.

abialas commented 6 years ago

The version of Stash is 1.3.0. I will try to create a simple small project and execute the analysis on it. However, I discovered that in case there is no new issue in PR then it can be approved. Seems the setting -Dsonar.stash.reviewer.approval.severity.threshold=BLOCKER is not taken into consideration.

t-8ch commented 6 years ago

The threshold was introduced in 1.4.0

abialas commented 6 years ago

Is there already a final version of 1.4.0 or just a SNAPSHOT?

t-8ch commented 6 years ago

https://github.com/AmadeusITGroup/sonar-stash/releases/tag/1.4.0