Merge changes If625b6ef,I943b4ab1
* changes: Set copyAllScoresIfNoCodeChange for Verified by default Set copyAllScoresOnTrivialRebase for Code-Review by default
This commit is contained in:
@@ -243,7 +243,7 @@ patch set and if it has the same code delta as the previous patch set.
|
|||||||
This is the case if the change was rebased onto a different parent.
|
This is the case if the change was rebased onto a different parent.
|
||||||
This can be used to enable sticky approvals, reducing turn-around for
|
This can be used to enable sticky approvals, reducing turn-around for
|
||||||
trivial rebases prior to submitting a change.
|
trivial rebases prior to submitting a change.
|
||||||
It is recommended to enable this for the Code-Review label.
|
For the pre-installed Code-Review label this is enabled by default.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
|
|
||||||
[[label_copyAllScoresIfNoCodeChange]]
|
[[label_copyAllScoresIfNoCodeChange]]
|
||||||
@@ -255,7 +255,8 @@ set and the same code delta as the previous patch set. This means only
|
|||||||
the commit message is different. This can be used to enable sticky
|
the commit message is different. This can be used to enable sticky
|
||||||
approvals on labels that only depend on the code, reducing turn-around
|
approvals on labels that only depend on the code, reducing turn-around
|
||||||
if only the commit message is changed prior to submitting a change.
|
if only the commit message is changed prior to submitting a change.
|
||||||
It is recommended to enable this for the Verified label if enabled.
|
For the Verified label that is installed by the link:pgm-init.html[init]
|
||||||
|
site program this is enabled by default.
|
||||||
Defaults to false.
|
Defaults to false.
|
||||||
|
|
||||||
[[label_copyAllScoresIfNoChange]]
|
[[label_copyAllScoresIfNoChange]]
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import java.util.Arrays;
|
|||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class InitLabels implements InitStep {
|
public class InitLabels implements InitStep {
|
||||||
|
private static final String KEY_COPY_ALL_SCORES_IF_NO_CODE_CHANGE =
|
||||||
|
"copyAllScoresIfNoCodeChange";
|
||||||
private static final String KEY_LABEL = "label";
|
private static final String KEY_LABEL = "label";
|
||||||
private static final String KEY_FUNCTION = "function";
|
private static final String KEY_FUNCTION = "function";
|
||||||
private static final String KEY_VALUE = "value";
|
private static final String KEY_VALUE = "value";
|
||||||
@@ -58,6 +60,7 @@ public class InitLabels implements InitStep {
|
|||||||
cfg.setString(KEY_LABEL, LABEL_VERIFIED, KEY_FUNCTION, "MaxWithBlock");
|
cfg.setString(KEY_LABEL, LABEL_VERIFIED, KEY_FUNCTION, "MaxWithBlock");
|
||||||
cfg.setStringList(KEY_LABEL, LABEL_VERIFIED, KEY_VALUE,
|
cfg.setStringList(KEY_LABEL, LABEL_VERIFIED, KEY_VALUE,
|
||||||
Arrays.asList(new String[] {"-1 Fails", " 0 No score", "+1 Verified"}));
|
Arrays.asList(new String[] {"-1 Fails", " 0 No score", "+1 Verified"}));
|
||||||
|
cfg.setBoolean(KEY_LABEL, LABEL_VERIFIED, KEY_COPY_ALL_SCORES_IF_NO_CODE_CHANGE, true);
|
||||||
allProjectsConfig.save("Configure 'Verified' label");
|
allProjectsConfig.save("Configure 'Verified' label");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ public class AllProjectsCreator {
|
|||||||
new LabelValue((short) -1, "I would prefer this is not merged as is"),
|
new LabelValue((short) -1, "I would prefer this is not merged as is"),
|
||||||
new LabelValue((short) -2, "This shall not be merged")));
|
new LabelValue((short) -2, "This shall not be merged")));
|
||||||
type.setCopyMinScore(true);
|
type.setCopyMinScore(true);
|
||||||
|
type.setCopyAllScoresOnTrivialRebase(true);
|
||||||
c.getLabelSections().put(type.getName(), type);
|
c.getLabelSections().put(type.getName(), type);
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user