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

1048: Missing integration comment causes mlbridge to throw exceptions #1205

Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -188,7 +188,8 @@ private List<ArchiveItem> generateArchiveItems(List<Email> sentEmails, Repositor
log.warning("Target commit for PR no longer exists, can't post or verify integration notice: " + hash.get());
} else {
throw new RuntimeException("PR " + pr.webUrl() + " has integrated label but no integration comment");"PR " + pr.webUrl() + " has integrated label but no integration comment, " +
"can't post integration notice until it does");
} else if (threadPrefix.equals("RFR")) {
var reply = ArchiveItem.closedNotice(pr, hostUserToEmailAuthor, parent, subjectPrefix);
@@ -336,16 +336,24 @@ void archiveIntegrated(TestInfo testInfo) throws IOException {
// Add a comment quickly before integration - it should not be combined with the integration message
pr.addComment("I will now integrate this PR");

// Now it has been integrated
// Mark it as integrated but skip adding the integration comment for now
var ignoredPr = ignored.pullRequest(;
ignoredPr.setBody("This has been integrated");
ignoredPr.addComment("Pushed as commit " + editHash + ".");

// Run another archive pass

// Verify that no integration message was added to the archive
assertFalse(archiveContains(archiveFolder.path(), "Subject: Integrated:"));

// Add the integration comment
ignoredPr.addComment("Pushed as commit " + editHash + ".");

// Run another archive pass

// The archive should now contain another entry
Repository.materialize(archiveFolder.path(), archive.url(), "master");
assertTrue(archiveContains(archiveFolder.path(), "Subject: Re: RFR: 1234: This is a pull request"));