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
278: Enhance the /solves command #556
Conversation
|
Webrevs
|
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
if (bot.issueProject() == null) { | ||
if (issue.description() == null) { | ||
reply.print("This repository does not have an issue project configured - you will need to input the issue title manually "); | ||
reply.println("using the syntax `/solves " + issue.id() + ": title of the issue`."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply.println("using the syntax `/solves " + issue.id() + ": title of the issue`."); | |
reply.println("using the syntax `/" + name + "` add " + issue.id() + ": title of the issue`."); |
} catch (RuntimeException e) { | ||
if (issue.description() == null) { | ||
reply.print("Temporary failure when trying to look up issue `" + issue.id() + "` - you will need to input the issue title manually "); | ||
reply.println("using the syntax `/solves " + issue.id() + ": title of the issue`."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply.println("using the syntax `/solves " + issue.id() + ": title of the issue`."); | |
reply.println("using the syntax `/" + name +"` add " + issue.id() + ": title of the issue`."); |
@Override | ||
public void handle(PullRequestBot bot, PullRequest pr, CensusInstance censusInstance, Path scratchPath, String args, Comment comment, List<Comment> allComments, PrintWriter reply) { | ||
if (!comment.author().equals(pr.author())) { | ||
reply.println("Only the author (@" + pr.author().userName() + ") is allowed to issue the `solves` command."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply.println("Only the author (@" + pr.author().userName() + ") is allowed to issue the `solves` command."); | |
reply.println("Only the author (@" + pr.author().userName() + ") is allowed to issue the `" + name + "` command."); |
for (var issue : issuesToRemove) { | ||
if (currentSolved.contains(issue.id())) { | ||
reply.println(SolvesTracker.removeSolvesMarker(issue)); | ||
reply.println("Removing additional issue from solves list: `" + issue.id() + "`."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply.println("Removing additional issue from solves list: `" + issue.id() + "`."); | |
reply.println("Removing additional issue from " + name + " list: `" + issue.id() + "`."); |
if (currentSolved.contains(issue.id())) { | ||
reply.println("Updating description of additional solved issue: `" + issue.toString() + "`."); | ||
} else { | ||
reply.println("Adding additional issue to solves list: `" + issue.toString() + "`."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reply.println("Adding additional issue to solves list: `" + issue.toString() + "`."); | |
reply.println("Adding additional issue to " + name + " list: `" + issue.toString() + "`."); |
@rwestberg This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 11 commits pushed to the
|
/integrate |
@rwestberg The following commits have been pushed to master since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit 60a1030. |
Mailing list message from Robin Westberg on skara-dev: Changeset: 60a1030 278: Enhance the /solves command Reviewed-by: ehelin ! bots/pr/src/main/java/org/openjdk/skara/bots/pr/CommandWorkItem.java |
Hi all,
Please review this change that improves the allowed syntax for the
/solves
command.Best regards,
Robin
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/skara pull/556/head:pull/556
$ git checkout pull/556