Skip to content
Permalink
Browse files
423: Avoid combining messages with different subjects
Reviewed-by: ehelin
  • Loading branch information
rwestberg committed Jun 17, 2020
1 parent 3431a9e commit 1f6b3236baccbcfbb5d6743f9655bbf82cf992ff
@@ -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\\]"));
}

1 comment on commit 1f6b323

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 1f6b323 Jun 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.