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

278: Enhance the /solves command #556

Closed
wants to merge 4 commits into from
Closed

Conversation

rwestberg
Copy link
Member

@rwestberg rwestberg commented Apr 1, 2020

Hi all,

Please review this change that improves the allowed syntax for the /solves command.

Best regards,
Robin


Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Issue

Reviewers

  • Erik Helin (ehelin - Reviewer) ⚠️ Review applies to 3728b2c

Download

$ git fetch https://git.openjdk.java.net/skara pull/556/head:pull/556
$ git checkout pull/556

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 1, 2020

👋 Welcome back rwestberg! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 1, 2020

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.
edvbld
edvbld approved these changes Apr 2, 2020
Copy link
Member

@edvbld edvbld left a comment

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`.");
Copy link
Member

@edvbld edvbld Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`.");
Copy link
Member

@edvbld edvbld Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.");
Copy link
Member

@edvbld edvbld Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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() + "`.");
Copy link
Member

@edvbld edvbld Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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() + "`.");
Copy link
Member

@edvbld edvbld Apr 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@openjdk
Copy link

@openjdk openjdk bot commented Apr 2, 2020

@rwestberg This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

278: Enhance the /solves command

Reviewed-by: ehelin
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there have been 11 commits pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate d48c124c04062e398a61ab93c7b185f0cc64429a.

➡️ To integrate this PR with the above commit message, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Apr 2, 2020
@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented Apr 2, 2020

/integrate

@openjdk openjdk bot closed this Apr 2, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Apr 2, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Apr 2, 2020

@rwestberg The following commits have been pushed to master since your change was applied:

  • d48c124: Allow disabling bidirectional mailing list syncing per repo
  • c231092: 344: PR should warn when source branch is an upstream branch
  • 32bba61: 340: Infer master for repos in the same org for merge style PRs
  • 87965d8: 343: Use ssh -G for parsing ssh configuration files
  • f385ff5: skara: explicitly update submodules
  • c0a0a50: Proper selection of merge commit to squash commits onto for merge style PRs
  • 870bf78: 339: Only show link to CONTRIBUTING.md if it exists
  • 73e43b7: vcs: handle clean renames in combined diff parser
  • 5ed1133: jcheck: add asString when parsing INI values
  • eef8fff: merge-bot: minor improvements to message
  • 0bcda97: forge: add HostedRepository.nonTransformedWebUrl

Your commit was automatically rebased without conflicts.

Pushed as commit 60a1030.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 2, 2020

Mailing list message from Robin Westberg on skara-dev:

Changeset: 60a1030
Author: Robin Westberg <rwestberg at openjdk.org>
Date: 2020-04-02 09:29:37 +0000
URL: https://git.openjdk.java.net/skara/commit/60a10303

278: Enhance the /solves command

Reviewed-by: ehelin

! bots/pr/src/main/java/org/openjdk/skara/bots/pr/CommandWorkItem.java
+ bots/pr/src/main/java/org/openjdk/skara/bots/pr/IssueCommand.java
- bots/pr/src/main/java/org/openjdk/skara/bots/pr/SolvesCommand.java
! bots/pr/src/main/java/org/openjdk/skara/bots/pr/SolvesTracker.java
+ bots/pr/src/test/java/org/openjdk/skara/bots/pr/IssueTests.java
- bots/pr/src/test/java/org/openjdk/skara/bots/pr/SolvesTests.java
! issuetracker/src/main/java/org/openjdk/skara/issuetracker/IssueProject.java
! issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraProject.java
! test/src/main/java/org/openjdk/skara/test/TestIssueProject.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants