From: Stas Vilchik Date: Fri, 28 Dec 2018 15:30:50 +0000 (+0100) Subject: forbid to use releasability metrics in quality gate conditions X-Git-Tag: 7.6~158 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d63621dffbe21b0204c41593bfa63c267a33ea3d;p=sonarqube.git forbid to use releasability metrics in quality gate conditions --- diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx index 5e36418900f..6dae3053fc3 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx @@ -39,6 +39,7 @@ interface Props { } const FORBIDDEN_METRIC_TYPES = ['DATA', 'DISTRIB', 'STRING', 'BOOL']; +const FORBIDDEN_METRICS = ['alert_status', 'releasability_rating']; export default class Conditions extends React.PureComponent { getConditionKey = (condition: T.Condition, index: number) => { @@ -71,7 +72,10 @@ export default class Conditions extends React.PureComponent { const availableMetrics = differenceWith( map(metrics, metric => metric).filter( - metric => !metric.hidden && !FORBIDDEN_METRIC_TYPES.includes(metric.type) + metric => + !metric.hidden && + !FORBIDDEN_METRIC_TYPES.includes(metric.type) && + !FORBIDDEN_METRICS.includes(metric.key) ), conditions, (metric, condition) => metric.key === condition.metric