Make reviewer.enableByEmail inheritable

This change makes the config inheritable, adds it to PutConfig
and adapts the test code and docs where needed.

The GWT UI is adapted such that the config can be set using the UI
control.

Change-Id: I7b4a52eebbb69c44c1095a6a4ea3e402d1eb4206
This commit is contained in:
Patrick Hiesel
2017-03-29 14:19:23 +02:00
parent 8d2b2bb95c
commit 502b26ca18
11 changed files with 52 additions and 54 deletions

View File

@@ -672,6 +672,7 @@ public class ProjectInfoScreen extends ProjectScreen {
esp,
rsp,
getBool(rejectImplicitMerges),
getBool(enableReviewerByEmail),
maxObjectSizeLimit.getText().trim(),
SubmitType.valueOf(submitType.getValue(submitType.getSelectedIndex())),
ProjectState.valueOf(state.getValue(state.getSelectedIndex())),

View File

@@ -147,6 +147,7 @@ public class ProjectApi {
InheritableBoolean enableSignedPush,
InheritableBoolean requireSignedPush,
InheritableBoolean rejectImplicitMerges,
InheritableBoolean enableReviewerByEmail,
String maxObjectSizeLimit,
SubmitType submitType,
ProjectState state,
@@ -170,6 +171,7 @@ public class ProjectApi {
in.setSubmitType(submitType);
in.setState(state);
in.setPluginConfigValues(pluginConfigValues);
in.setEnableReviewerByEmail(enableReviewerByEmail);
project(name).view("config").put(in, cb);
}
@@ -294,6 +296,13 @@ public class ProjectApi {
setRequireSignedPushRaw(v.name());
}
final void setEnableReviewerByEmail(InheritableBoolean v) {
setEnableReviewerByEmailRaw(v.name());
}
private native void setEnableReviewerByEmailRaw(String v)
/*-{ if(v)this.enable_reviewer_by_email=v; }-*/ ;
private native void setRequireSignedPushRaw(String v)
/*-{ if(v)this.require_signed_push=v; }-*/ ;