Skip to content
Permalink
Browse files
318: The "outdated" label should be renamed to "merge-conlict"
Reviewed-by: ehelin
  • Loading branch information
rwestberg committed Mar 23, 2020
1 parent 4e75eeb commit 8cbce58da70e5568971e9e05dde805ac6f2876de
Showing 3 changed files with 10 additions and 7 deletions.
@@ -609,16 +609,16 @@ private void checkStatus() {
var commitMessage = String.join("\n", commit.message());
var readyForIntegration = visitor.getMessages().isEmpty() && additionalErrors.isEmpty();
updateMergeReadyComment(readyForIntegration, commitMessage, comments, activeReviews, rebasePossible);
if (readyForIntegration) {
if (readyForIntegration && rebasePossible) {
newLabels.add("ready");
} else {
newLabels.remove("ready");
}
if (!rebasePossible) {
addOutdatedComment(comments);
newLabels.add("outdated");
newLabels.add("merge-conflict");
} else {
newLabels.remove("outdated");
newLabels.remove("merge-conflict");
}

// Ensure that the ready for sponsor label is up to date
@@ -564,6 +564,7 @@ void cannotRebase(TestInfo testInfo) throws IOException {

// Get all messages up to date
TestBotRunner.runPeriodicItems(mergeBot);
assertTrue(pr.labels().contains("ready"));

// Push something conflicting to master
localRepo.checkout(masterHash, true);
@@ -581,7 +582,8 @@ void cannotRebase(TestInfo testInfo) throws IOException {
assertEquals(1, updated);

// The PR should be flagged as outdated
assertTrue(pr.labels().contains("outdated"));
assertTrue(pr.labels().contains("merge-conflict"));
assertFalse(pr.labels().contains("ready"));

// An instructional message should have been bosted
var help = pr.comments().stream()
@@ -608,7 +610,8 @@ void cannotRebase(TestInfo testInfo) throws IOException {
assertEquals(1, updated);

// The PR should not be flagged as outdated
assertFalse(pr.labels().contains("outdated"));
assertFalse(pr.labels().contains("merge-conflict"));
assertTrue(pr.labels().contains("ready"));
}
}

@@ -160,8 +160,8 @@ static String statusForPullRequest(PullRequest pr) {
return "READY";
} else if (labels.contains("rfr")) {
return "RFR";
} else if (labels.contains("outdated")) {
return "OUTDATED";
} else if (labels.contains("merge-conflict")) {
return "CONFLICT";
} else if (labels.contains("oca")) {
return "OCA";
} else {

0 comments on commit 8cbce58

Please sign in to comment.