Merge branch 'stable-3.2' into stable-3.3
* stable-3.2:
UI: Don't suggest unsupported system groups
Document that configured groups must be visible to uploader
Bazel: Remove unnecessary plugin_name parameter
Change-Id: I0781085e75a0145b49d4d86a4ea061518d8da410
diff --git a/BUILD b/BUILD
index b0ef90f..6f5f9dc 100644
--- a/BUILD
+++ b/BUILD
@@ -37,7 +37,6 @@
polygerrit_plugin(
name = "rv-reviewers",
app = "reviewers-bundle.js",
- plugin_name = "rv-reviewers",
)
rollup_bundle(
diff --git a/rv-reviewers/rv-reviewer.js b/rv-reviewers/rv-reviewer.js
index 6145013..338b428 100644
--- a/rv-reviewers/rv-reviewer.js
+++ b/rv-reviewers/rv-reviewer.js
@@ -16,6 +16,8 @@
*/
import {htmlTemplate} from './rv-reviewer_html.js';
+const SYSTEM_GROUP_PREFIX = 'global%3A';
+
class RvReviewer extends Polymer.Element {
/** @returns {string} name of the component */
static get is() { return 'rv-reviewer'; }
@@ -104,7 +106,9 @@
if (!groups) { return []; }
const groupSuggestions = [];
for (const key in groups) {
- if (!groups.hasOwnProperty(key) || key.startsWith('user/')) {
+ if (!groups.hasOwnProperty(key) ||
+ groups[key].id.startsWith(SYSTEM_GROUP_PREFIX) ||
+ key.startsWith('user/')) {
continue;
}
groupSuggestions.push({
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md
index 1b51181..173f51a 100644
--- a/src/main/resources/Documentation/config.md
+++ b/src/main/resources/Documentation/config.md
@@ -51,7 +51,10 @@
filter.\<filter\>.reviewer
: An account or a group name. Must be an exact match (case sensitive) with the
account's email address or username, or the group name. Multiple `reviewer`
- occurrences are allowed.
+ occurrences are allowed.\
+ **NOTE**: *Reviewers are added in the context of the uploader which means
+ that if a group is configured it needs to be visible to the uploader for
+ reviewers to be added.*
filter.\<filter\>.cc
: An account or a group name. Must be an exact match (case sensitive) with the