Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

318: The "outdated" label should be renamed to "merge-conlict" #531

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand All @@ -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"));
}
}

Expand Down
4 changes: 2 additions & 2 deletions cli/src/main/java/org/openjdk/skara/cli/pr/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down