Merge "Break out ReviewerFilter filtering to util class"
diff --git a/rv-reviewers/rv-filter-section.js b/rv-reviewers/rv-filter-section.js
index e2e1b20..ae43a62 100644
--- a/rv-reviewers/rv-filter-section.js
+++ b/rv-reviewers/rv-filter-section.js
@@ -80,7 +80,7 @@
_handleReviewerDeleted(e) {
const type = e.detail.type;
if (e.detail.editing) {
- if (type === "CC") {
+ if (type === 'CC') {
this.ccs.pop();
} else {
this.reviewers.pop();
diff --git a/rv-reviewers/rv-reviewer.js b/rv-reviewers/rv-reviewer.js
index f748b51..6145013 100644
--- a/rv-reviewers/rv-reviewer.js
+++ b/rv-reviewers/rv-reviewer.js
@@ -80,8 +80,8 @@
}
_computeHideAddButton(reviewer, _originalReviewer) {
- return !(this._computeEditing(reviewer, _originalReviewer)
- && this._reviewerSearchId);
+ return !(this._computeEditing(reviewer, _originalReviewer) &&
+ this._reviewerSearchId);
}
_computeHideDeleteButton(canModifyConfig) {
@@ -104,7 +104,9 @@
if (!groups) { return []; }
const groupSuggestions = [];
for (const key in groups) {
- if (!groups.hasOwnProperty(key)) { continue; }
+ if (!groups.hasOwnProperty(key) || key.startsWith('user/')) {
+ continue;
+ }
groupSuggestions.push({
name: key,
value: key,
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index 9de1838..93c466f 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -8,6 +8,12 @@
to a change that is in `private` state. Reviewers will only be added to such a
change if it transitions out of `private` state.
+__NOTE__:
+This plugin automatically naively filters out groups that follow the style from
+the singleusergroup plugin.
+This means that groups that start with `user/` will not be suggested, regardless
+of source.
+
SEE ALSO
--------