Skip to content
Permalink
Browse files
Improve the Download message in PR description
Reviewed-by: ehelin
  • Loading branch information
magicus committed Mar 16, 2021
1 parent dc052db commit a6a7efaa0dc2888eb516d422ebac84f1e73c2bfc
Showing 1 changed file with 11 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -519,9 +519,18 @@ private String getStatusMessage(List<Comment> comments, List<Review> reviews, Pu

private String checkoutCommands() {
var repoUrl = pr.repository().webUrl();
return
var firstTime =
"`$ git fetch " + repoUrl + " " + pr.fetchRef() + ":pull/" + pr.id() + "`\n" +
"`$ git checkout pull/" + pr.id() + "`\n";
var updating =
"`$ git checkout pull/" + pr.id() + "`\n" +
"`$ git pull " + repoUrl + " " + pr.fetchRef() + "`\n";

return "To checkout this PR locally:\n" +
firstTime +
"\n" +
"To update a local copy of the PR:\n" +
updating;
}

private String bodyWithoutStatus() {

1 comment on commit a6a7efa

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on a6a7efa Mar 16, 2021

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.