RFR: 1686: Warning message for backport mistakes is not clear

Erik Joelsson erikj at openjdk.org
Tue Nov 22 20:09:34 UTC 2022

On Mon, 21 Nov 2022 19:19:47 GMT, Zhao Song <zsong at openjdk.org> wrote:

> A user reported that he found many PR with "issue is not open" warning. After discussing in slack, we found that this happens because backport-style PR wasn't used. 
> To improve the experience of user, we need to give some useful information to the user instead of just telling them "Issue is not open".
> In this patch, when a user is trying to create a PR related with a resolved issue, we will assume that the user wants to create a backport PR but in the wrong way. So in this case, we will tell the user how to create a correct backport pr. In other case, for example, the issue is closed with "Not an Issue", we will still just tell the user "Issue is not open".

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 644:

> 642:                                         (issueType == null || !List.of("CSR", "JEP").contains(issueType.asString()))) {
> 643:                                     if (iss.get().isFixed()) {
> 644:                                         progressBody.append("⚠️ " + iss.get().id() + " is already resolved. " +

No need to print the ID here, it's already present first on the line. Also, it looks like you are missing a space before the warning emoji.

                                        progressBody.append(" ⚠️ Issue is already resolved. " +

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 647:

> 645:                                                 "Please consider using a Backport-style pull request. " +
> 646:                                                 "You can set the PR title to `Backport <hash>` with the hash of the original fix or " +
> 647:                                                 "refer to [Backports](https://wiki.openjdk.org/display/SKARA/Backports)");


                                                "Consider making this a "backport pull request" by setting " +
                                                "the PR title to `Backport <hash>` with the hash of the original commit. " +
                                                "See [Backports](https://wiki.openjdk.org/display/SKARA/Backports).");


PR: https://git.openjdk.org/skara/pull/1425

More information about the skara-dev mailing list