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

423: Avoid combining messages with different subjects #668

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -184,6 +184,9 @@ private Set<String> sentItemIds(List<Email> sentEmails) {
private String parentAuthorPath(ArchiveItem item) {
var ret = new StringBuilder();
ret.append(item.author().id());
ret.append(":");
ret.append(item.subject());
ret.append(":");
while (item.parent().isPresent()) {
item = item.parent().get();
ret.append(".");
@@ -323,6 +323,9 @@ void archiveIntegrated(TestInfo testInfo) throws IOException {
Repository.materialize(archiveFolder.path(), archive.url(), "master");
assertTrue(archiveContains(archiveFolder.path(), "Subject: RFR: 1234: This is a pull request"));

// 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
var ignoredPr = ignored.pullRequest(pr.id());
ignoredPr.setBody("This has been integrated");
@@ -335,6 +338,7 @@ void archiveIntegrated(TestInfo testInfo) throws IOException {

// 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"));
assertTrue(archiveContains(archiveFolder.path(), "Subject: Integrated: 1234: This is a pull request"));
assertFalse(archiveContains(archiveFolder.path(), "\\[Closed\\]"));
}