Merge changes Ibc413d7d,Idd5168ff into stable-2.15
* changes: Remove handling of change.allowDrafts Remove documentation on change.allowDrafts
This commit is contained in:
commit
e0f1d86b8f
@ -1097,13 +1097,6 @@ Allow blame on side by side diff. If set to false, blame cannot be used.
|
||||
+
|
||||
Default is true.
|
||||
|
||||
[[change.allowDrafts]]change.allowDrafts::
|
||||
+
|
||||
Allow drafts workflow. If set to false, drafts cannot be created,
|
||||
deleted or published.
|
||||
+
|
||||
Default is true.
|
||||
|
||||
[[change.cacheAutomerge]]change.cacheAutomerge::
|
||||
+
|
||||
When reviewing diff commits, the left-hand side shows the output of the
|
||||
|
@ -54,7 +54,6 @@ public class ServerInfoIT extends AbstractDaemonTest {
|
||||
@GerritConfig(name = "auth.httpPasswordUrl", value = "https://example.com/password")
|
||||
|
||||
// change
|
||||
@GerritConfig(name = "change.allowDrafts", value = "false")
|
||||
@GerritConfig(name = "change.largeChange", value = "300")
|
||||
@GerritConfig(name = "change.replyTooltip", value = "Publish votes and draft comments")
|
||||
@GerritConfig(name = "change.replyLabel", value = "Vote")
|
||||
@ -99,7 +98,6 @@ public class ServerInfoIT extends AbstractDaemonTest {
|
||||
assertThat(i.auth.httpPasswordUrl).isNull();
|
||||
|
||||
// change
|
||||
assertThat(i.change.allowDrafts).isNull();
|
||||
assertThat(i.change.largeChange).isEqualTo(300);
|
||||
assertThat(i.change.replyTooltip).startsWith("Publish votes and draft comments");
|
||||
assertThat(i.change.replyLabel).isEqualTo("Vote\u2026");
|
||||
@ -173,7 +171,6 @@ public class ServerInfoIT extends AbstractDaemonTest {
|
||||
assertThat(i.auth.httpPasswordUrl).isNull();
|
||||
|
||||
// change
|
||||
assertThat(i.change.allowDrafts).isTrue();
|
||||
assertThat(i.change.largeChange).isEqualTo(500);
|
||||
assertThat(i.change.replyTooltip).startsWith("Reply and score");
|
||||
assertThat(i.change.replyLabel).isEqualTo("Reply\u2026");
|
||||
|
@ -17,7 +17,6 @@ package com.google.gerrit.extensions.common;
|
||||
public class ChangeConfigInfo {
|
||||
public Boolean allowBlame;
|
||||
public Boolean showAssigneeInChangesTable;
|
||||
public Boolean allowDrafts;
|
||||
public Boolean disablePrivateChanges;
|
||||
public int largeChange;
|
||||
public String replyLabel;
|
||||
|
@ -60,8 +60,6 @@ public class ServerInfo extends JavaScriptObject {
|
||||
protected ServerInfo() {}
|
||||
|
||||
public static class ChangeConfigInfo extends JavaScriptObject {
|
||||
public final native boolean allowDrafts() /*-{ return this.allow_drafts || false; }-*/;
|
||||
|
||||
public final native boolean allowBlame() /*-{ return this.allow_blame || false; }-*/;
|
||||
|
||||
public final native int largeChange() /*-{ return this.large_change || 0; }-*/;
|
||||
|
@ -38,15 +38,10 @@ import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
|
||||
class DeleteChangeOp implements BatchUpdateOp {
|
||||
static boolean allowDrafts(Config cfg) {
|
||||
return cfg.getBoolean("change", "allowDrafts", true);
|
||||
}
|
||||
|
||||
static ReviewDb unwrap(ReviewDb db) {
|
||||
// This is special. We want to delete exactly the rows that are present in
|
||||
// the database, even when reading everything else from NoteDb, so we need
|
||||
|
@ -222,7 +222,6 @@ public class GetServerInfo implements RestReadView<ConfigResource> {
|
||||
private ChangeConfigInfo getChangeInfo(Config cfg) {
|
||||
ChangeConfigInfo info = new ChangeConfigInfo();
|
||||
info.allowBlame = toBoolean(cfg.getBoolean("change", "allowBlame", true));
|
||||
info.allowDrafts = toBoolean(cfg.getBoolean("change", "allowDrafts", true));
|
||||
boolean hasAssigneeInIndex =
|
||||
indexes.getSearchIndex().getSchema().hasField(ChangeField.ASSIGNEE);
|
||||
info.showAssigneeInChangesTable =
|
||||
|
@ -217,7 +217,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
final Provider<ReviewDb> db;
|
||||
final StarredChangesUtil starredChangesUtil;
|
||||
final SubmitDryRun submitDryRun;
|
||||
final boolean allowsDrafts;
|
||||
|
||||
private final Provider<CurrentUser> self;
|
||||
|
||||
@ -281,7 +280,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
listMembers,
|
||||
starredChangesUtil,
|
||||
accountCache,
|
||||
cfg == null ? true : cfg.getBoolean("change", "allowDrafts", true),
|
||||
notesMigration);
|
||||
}
|
||||
|
||||
@ -313,7 +311,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
Provider<ListMembers> listMembers,
|
||||
StarredChangesUtil starredChangesUtil,
|
||||
AccountCache accountCache,
|
||||
boolean allowsDrafts,
|
||||
NotesMigration notesMigration) {
|
||||
this.db = db;
|
||||
this.queryProvider = queryProvider;
|
||||
@ -341,7 +338,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
this.listMembers = listMembers;
|
||||
this.starredChangesUtil = starredChangesUtil;
|
||||
this.accountCache = accountCache;
|
||||
this.allowsDrafts = allowsDrafts;
|
||||
this.hasOperands = hasOperands;
|
||||
this.notesMigration = notesMigration;
|
||||
}
|
||||
@ -375,7 +371,6 @@ public class ChangeQueryBuilder extends QueryBuilder<ChangeData> {
|
||||
listMembers,
|
||||
starredChangesUtil,
|
||||
accountCache,
|
||||
allowsDrafts,
|
||||
notesMigration);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user