Skip to content
Permalink
Browse files

Make subject tags consistent

Reviewed-by: ehelin
  • Loading branch information
Robin Westberg
Robin Westberg committed Sep 17, 2019
1 parent 2c1e9ac commit 7ee97c329ed5703fc3f82467fe109218e396e3ff
@@ -190,7 +190,7 @@ void addFull(URI webrev) {
var body = ArchiveMessages.composeRebaseComment(prInstance, webrev);
var id = getMessageId(prInstance.headHash());
var parent = topEmail();
var email = Email.reply(parent, "Re: " + latestHeadPrefix() + ": RFR: " + prInstance.pr().getTitle(), body)
var email = Email.reply(parent, "Re: " + latestHeadPrefix() + " RFR: " + prInstance.pr().getTitle(), body)
.sender(sender)
.author(getAuthorAddress(prInstance.pr().getAuthor()))
.recipient(parent.author())
@@ -207,7 +207,7 @@ void addIncremental(URI fullWebrev, URI incrementalWebrev) {
var body = ArchiveMessages.composeIncrementalComment(latestHead(), prInstance, fullWebrev, incrementalWebrev);
var id = getMessageId(prInstance.headHash());
var parent = topEmail();
var email = Email.reply(parent, "Re: " + latestHeadPrefix() + ": RFR: " + prInstance.pr().getTitle(), body)
var email = Email.reply(parent, "Re: " + latestHeadPrefix() + " RFR: " + prInstance.pr().getTitle(), body)
.sender(sender)
.author(getAuthorAddress(prInstance.pr().getAuthor()))
.recipient(parent.author())
@@ -332,7 +332,7 @@ void addReview(Review review) {
// Approvals by Reviewers get special treatment - post these as top-level comments
if (review.verdict() == Review.Verdict.APPROVED && isReviewer) {
parent = topEmail();
subject = "Re: [Approved]: " + "RFR: " + prInstance.pr().getTitle();
subject = "Re: [Approved] " + "RFR: " + prInstance.pr().getTitle();
}

var userName = contributor != null ? contributor.username() : review.reviewer().userName() + "@" + censusInstance.namespace().name();
@@ -504,7 +504,7 @@ void commentThreading(TestInfo testInfo) throws IOException {
var thread3 = conversations.get(0).replies(mail).get(2);
assertEquals("Re: RFR: This is a pull request", thread3.subject());
var thread4 = conversations.get(0).replies(mail).get(3);
assertEquals("Re: [Approved]: RFR: This is a pull request", thread4.subject());
assertEquals("Re: [Approved] RFR: This is a pull request", thread4.subject());
}
}

@@ -795,9 +795,9 @@ void incrementalChanges(TestInfo testInfo) throws IOException {
assertEquals(1, updatedConversations.size());
var conversation = updatedConversations.get(0);
assertEquals(6, conversation.allMessages().size());
assertEquals("Re: [Rev 01]: RFR: This is a pull request", conversation.allMessages().get(1).subject());
assertEquals("Re: [Rev 01]: RFR: This is a pull request", conversation.allMessages().get(2).subject(), conversation.allMessages().get(2).toString());
assertEquals("Re: [Rev 04]: RFR: This is a pull request", conversation.allMessages().get(5).subject());
assertEquals("Re: [Rev 01] RFR: This is a pull request", conversation.allMessages().get(1).subject());
assertEquals("Re: [Rev 01] RFR: This is a pull request", conversation.allMessages().get(2).subject(), conversation.allMessages().get(2).toString());
assertEquals("Re: [Rev 04] RFR: This is a pull request", conversation.allMessages().get(5).subject());
}
}

@@ -884,7 +884,7 @@ void rebased(TestInfo testInfo) throws IOException {
assertEquals(sender, newMail.sender());
assertFalse(newMail.hasHeader("PR-Head-Hash"));
}
assertEquals("Re: [Rev 01]: RFR: This is a pull request", conversations.get(0).allMessages().get(1).subject());
assertEquals("Re: [Rev 01] RFR: This is a pull request", conversations.get(0).allMessages().get(1).subject());
}
}

@@ -1025,7 +1025,7 @@ void notifyReviewVerdicts(TestInfo testInfo) throws IOException {
if (author.host().supportsReviewBody()) {
assertEquals(1, archiveContainsCount(archiveFolder.path(), "Reason 2"));
}
assertEquals(1, archiveContainsCount(archiveFolder.path(), "Re: \\[Approved\\]:"));
assertEquals(1, archiveContainsCount(archiveFolder.path(), "Re: \\[Approved\\] RFR:"));

// Yet another change
reviewedPr.addReview(Review.Verdict.DISAPPROVED, "Reason 3");

0 comments on commit 7ee97c3

Please sign in to comment.
You can’t perform that action at this time.