Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

Approve PR only when all issues are below threshold severity #140

Closed
wants to merge 1 commit into from

Conversation

kzaikin
Copy link

@kzaikin kzaikin commented Jul 24, 2017

This will fix #95
These changes will modify default behavor which should be discussed.

If there are consumers who want PR to be approved when there are zero issues, then additional threshold value should be added. Something like sonar.stash.reviewer.approval.issue.severity.threshold
However, this can be leveraged by lowing down sonar.stash.task.issue.severity.threshold

My opinion is to keep number of settings as low as possible and NOT to add any additional thresholds. Approving a PR as soon as there are no issue-tasks left looks quite natural so I'd stay with that as default behavior.

@kzaikin kzaikin force-pushed the approve_threshold branch from 66357a0 to e2eba6b Compare July 25, 2017 06:27
@t-8ch
Copy link
Contributor

t-8ch commented Jul 25, 2017

Hi @kzaikin, thanks for this!

FYI #95 is for a different usecase. In the SonarQube WebUI you can define lots of conditions when to accept the state of a project. Unfortunately this is not yet evaluated for preview builds.

To be honest I would prefer to have the preview functionality from SonarQube side than to implement all kinds of conditions in the plugin.

Do you have an urgent to use this new setting on your end or would you be fine with waiting for SonarSource to implement this on their side?

@kzaikin
Copy link
Author

kzaikin commented Jul 25, 2017

@t-8ch I have a dozen teams inside my company waiting for this change
I think we can modify the code to use Sonar's quality gates later, as soon as quality gates are available in preview analysis

@t-8ch
Copy link
Contributor

t-8ch commented Jul 25, 2017

@kzaikin Fair enough.
I would prefer a dedicated setting though. (In the hope of being able to delete it soon...)
It would also be nicer to have a comparator implementation for severities, so we do not have to pass around lists of strings...

@t-8ch
Copy link
Contributor

t-8ch commented Jul 26, 2017

@kzaikin I implemented a version of this in #141.
Would this cover your usecase?

@kzaikin kzaikin force-pushed the approve_threshold branch from e2eba6b to 8c4568e Compare July 26, 2017 22:14
@t-8ch
Copy link
Contributor

t-8ch commented Aug 2, 2017

Superseeded by #141

@t-8ch t-8ch closed this Aug 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tie approval to pass of the quality gate
2 participants