[Rev 01] RFR: 278: Enhance the /solves command

Erik Helin ehelin at openjdk.java.net
Thu Apr 2 05:13:20 UTC 2020


On Wed, 1 Apr 2020 13:58:10 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review this change that improves the allowed syntax for the `/solves` command.
>> 
>> Best regards,
>> Robin
>
> Robin Westberg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updated after offline review
>   
>   The primary form of the command is now /issue add or /issue remove. The /solves command remains as an alias, and can
>   continue to be used with the previous syntax, as the "add" word is optional.

Looks really nice, just a few comment places where `/solves` is still lingering ��

bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueCommand.java line 169:

> 168:                                 reply.print("This repository does not have an issue project configured - you will
> need to input the issue title manually "); 169:                                 reply.println("using the syntax
> `/solves " + issue.id() + ": title of the issue`."); 170:                                 return;

Suggestion:

                                reply.println("using the syntax `/" + name + "` add " + issue.id() + ": title of the issue`.");

bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueCommand.java line 194:

> 193:                             reply.print("Temporary failure when trying to look up issue `" + issue.id() + "` - you
> will need to input the issue title manually "); 194:                             reply.println("using the syntax
> `/solves " + issue.id() + ": title of the issue`."); 195:                             return;

Suggestion:

                            reply.println("using the syntax `/" + name +"` add " + issue.id() + ": title of the issue`.");

bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueCommand.java line 108:

> 107:         if (!comment.author().equals(pr.author())) {
> 108:             reply.println("Only the author (@" + pr.author().userName() + ") is allowed to issue the `solves`
> command."); 109:             return;

Suggestion:

            reply.println("Only the author (@" + pr.author().userName() + ") is allowed to issue the `" + name + "` command.");

bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueCommand.java line 140:

> 139:                         reply.println(SolvesTracker.removeSolvesMarker(issue));
> 140:                         reply.println("Removing additional issue from solves list: `" + issue.id() + "`.");
> 141:                     } else {

Suggestion:

                        reply.println("Removing additional issue from " + name + " list: `" + issue.id() + "`.");

bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueCommand.java line 228:

> 227:                     } else {
> 228:                         reply.println("Adding additional issue to solves list: `" + issue.toString() + "`.");
> 229:                     }

Suggestion:

                        reply.println("Adding additional issue to " + name + " list: `" + issue.toString() + "`.");

-------------

Marked as reviewed by ehelin (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/556


More information about the skara-dev mailing list