Skip to content

Commit 7b58903

Browse files
author
Mike Taylor
committed
Issue #660. Update comments in updateLabels.
1 parent b7eb659 commit 7b58903

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

webcompat/static/js/lib/models/issue.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,13 @@
104104
return;
105105
}
106106

107-
// for each label in labels array
108-
// filter over each repoLabel in repoLabelsArray
107+
// Reconstruct the namespaced labels by comparing the "new" labels
108+
// against the original namespaced labels from the repo.
109+
//
110+
// for each label in the labels array
111+
// filter over each repoLabel in the repoLabelsArray
109112
// if a regex from namespaceRegex + label matches against repoLabel
110-
// return that (and flatten the result because it's now an array of 3 arrays)
113+
// return that (and flatten the result because it's now an array of N arrays)
111114
var labelsToUpdate = _.flatten(_.map(labelsArray, function(label) {
112115
return _.filter(repoLabelsArray, function(repoLabel) {
113116
if (new RegExp(namespaceRegex + label + '$', 'i').test(repoLabel)) {

0 commit comments

Comments
 (0)