Merge branch 'stable-2.15' into stable-2.16
* stable-2.15: ReceiveCommits: Fix setting [PRIVATE] and [WIP] for updated changes ElasticContainer: Use 6.5.3 for V6_5 tests Upgrade elasticsearch-rest-client to 6.5.3 Change-Id: Id5acbce5a12a681856b95f9e160a83552046c5bb
This commit is contained in:
@@ -1091,8 +1091,8 @@ maven_jar(
|
|||||||
# and httpasyncclient as necessary.
|
# and httpasyncclient as necessary.
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "elasticsearch-rest-client",
|
name = "elasticsearch-rest-client",
|
||||||
artifact = "org.elasticsearch.client:elasticsearch-rest-client:6.5.2",
|
artifact = "org.elasticsearch.client:elasticsearch-rest-client:6.5.3",
|
||||||
sha1 = "6ad0dd15affe56be7dfe638fe317bc5f7456b730",
|
sha1 = "ac8df46fce1c01b61cbf1f84186bf910d12b577e",
|
||||||
)
|
)
|
||||||
|
|
||||||
JACKSON_VERSION = "2.9.7"
|
JACKSON_VERSION = "2.9.7"
|
||||||
|
|||||||
@@ -728,44 +728,39 @@ class ReceiveCommits {
|
|||||||
addMessage("");
|
addMessage("");
|
||||||
addMessage("Updated Changes:");
|
addMessage("Updated Changes:");
|
||||||
boolean edit = magicBranch != null && (magicBranch.edit || magicBranch.draft);
|
boolean edit = magicBranch != null && (magicBranch.edit || magicBranch.draft);
|
||||||
Boolean isPrivate = null;
|
|
||||||
Boolean wip = null;
|
|
||||||
if (magicBranch != null) {
|
|
||||||
if (magicBranch.isPrivate) {
|
|
||||||
isPrivate = true;
|
|
||||||
} else if (magicBranch.removePrivate) {
|
|
||||||
isPrivate = false;
|
|
||||||
}
|
|
||||||
if (magicBranch.workInProgress) {
|
|
||||||
wip = true;
|
|
||||||
} else if (magicBranch.ready) {
|
|
||||||
wip = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (ReplaceRequest u : updated) {
|
for (ReplaceRequest u : updated) {
|
||||||
String subject;
|
String subject;
|
||||||
|
Change change = u.notes.getChange();
|
||||||
if (edit) {
|
if (edit) {
|
||||||
try {
|
try {
|
||||||
subject = receivePack.getRevWalk().parseCommit(u.newCommitId).getShortMessage();
|
subject = receivePack.getRevWalk().parseCommit(u.newCommitId).getShortMessage();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// Log and fall back to original change subject
|
// Log and fall back to original change subject
|
||||||
logger.atWarning().withCause(e).log("failed to get subject for edit patch set");
|
logger.atWarning().withCause(e).log("failed to get subject for edit patch set");
|
||||||
subject = u.notes.getChange().getSubject();
|
subject = change.getSubject();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
subject = u.info.getSubject();
|
subject = u.info.getSubject();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isPrivate == null) {
|
boolean isPrivate = change.isPrivate();
|
||||||
isPrivate = u.notes.getChange().isPrivate();
|
boolean wip = change.isWorkInProgress();
|
||||||
}
|
if (magicBranch != null) {
|
||||||
if (wip == null) {
|
if (magicBranch.isPrivate) {
|
||||||
wip = u.notes.getChange().isWorkInProgress();
|
isPrivate = true;
|
||||||
|
} else if (magicBranch.removePrivate) {
|
||||||
|
isPrivate = false;
|
||||||
|
}
|
||||||
|
if (magicBranch.workInProgress) {
|
||||||
|
wip = true;
|
||||||
|
} else if (magicBranch.ready) {
|
||||||
|
wip = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeReportFormatter.Input input =
|
ChangeReportFormatter.Input input =
|
||||||
ChangeReportFormatter.Input.builder()
|
ChangeReportFormatter.Input.builder()
|
||||||
.setChange(u.notes.getChange())
|
.setChange(change)
|
||||||
.setSubject(subject)
|
.setSubject(subject)
|
||||||
.setIsEdit(edit)
|
.setIsEdit(edit)
|
||||||
.setIsPrivate(isPrivate)
|
.setIsPrivate(isPrivate)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class ElasticContainer extends ElasticsearchContainer {
|
|||||||
case V6_4:
|
case V6_4:
|
||||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.3";
|
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.3";
|
||||||
case V6_5:
|
case V6_5:
|
||||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.2";
|
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.3";
|
||||||
case V7_0:
|
case V7_0:
|
||||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:7.0.0-alpha1";
|
return "docker.elastic.co/elasticsearch/elasticsearch-oss:7.0.0-alpha1";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user