From 239c62204439db24441f284bb6d7300fac67d28f Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Fri, 26 Apr 2019 13:02:13 -0700 Subject: [PATCH] Don't tag redundant ignored warnings counts on changesets --- modules/ui/commit.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/ui/commit.js b/modules/ui/commit.js index a8602635f..c5a7e01e4 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -24,7 +24,6 @@ var readOnlyTags = [ /^imagery_used$/, /^host$/, /^locale$/, - /^warnings$/, /^warnings:/ ]; @@ -117,7 +116,7 @@ export function uiCommit(context) { // remove existing warning counts for (var key in tags) { - if (key === 'warnings' || key.match(/^warnings:/)) { + if (key.match(/^warnings:/)) { delete tags[key]; } } @@ -126,20 +125,17 @@ export function uiCommit(context) { var warnings = context.validator() .getIssuesBySeverity({ what: 'edited', where: 'all' }).warning; - if (warnings.length) { - tags.warnings = warnings.length.toString(); - } - var warningsByType = utilArrayGroupBy(warnings, 'type'); for (var warningType in warningsByType) { var warningsOfType = warningsByType[warningType]; - tags['warnings:' + warningType] = warningsOfType.length.toString(); if (warningsOfType[0].subtype) { var warningsBySubtype = utilArrayGroupBy(warningsOfType, 'subtype'); for (var warningSubtype in warningsBySubtype) { var warningsOfSubtype = warningsBySubtype[warningSubtype]; tags['warnings:' + warningType + ':' + warningSubtype] = warningsOfSubtype.length.toString(); } + } else { + tags['warnings:' + warningType] = warningsOfType.length.toString(); } }