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

pr: update error message for backports #1101

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -119,8 +119,8 @@ public void handle(PullRequestBot bot, HostedCommit commit, CensusInstance censu
var didApply = localRepo.cherryPick(fetchHead);
if (!didApply) {
var lines = new ArrayList<String>();
lines.add("@" + username + " :warning: could not backport `" + hash.abbreviate() + "` to " +
"[" + repoName + "](" + targetRepo.webUrl() + "] due to conflicts in the following files:");
lines.add("@" + username + " could **not** automatically backport `" + hash.abbreviate() + "` to " +
"[" + repoName + "](" + targetRepo.webUrl() + ") due to conflicts in the following files:");
lines.add("");
var unmerged = localRepo.status()
.stream()
@@ -142,7 +142,7 @@ public void handle(PullRequestBot bot, HostedCommit commit, CensusInstance censu
lines.add("$ git commit -m 'Backport " + hash.hex() + "'");
lines.add("```");
lines.add("");
lines.add("Once you have resolved the conflicts as explained above continue with creating a pull request towards the [" + repoName + "](" + targetRepo.webUrl() + ") with the title \"Backport " + hash.hex() + "\".");
lines.add("Once you have resolved the conflicts as explained above continue with creating a pull request towards the [" + repoName + "](" + targetRepo.webUrl() + ") with the title `Backport " + hash.hex() + "`.");

reply.println(String.join("\n", lines));
localRepo.reset(head, true);
@@ -193,7 +193,7 @@ void backportDoesNotApply(TestInfo testInfo) throws IOException {
var recentCommitComments = author.recentCommitComments();
assertEquals(2, recentCommitComments.size());
var botReply = recentCommitComments.get(0);
assertTrue(botReply.body().contains(":warning: could not backport"));
assertTrue(botReply.body().contains("could **not** automatically backport"));
assertEquals(List.of(), author.pullRequests());
}
}