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

Assign unassigned issues when resolving them #357

Closed
wants to merge 2 commits into from

Conversation

rwestberg
Copy link
Member

@rwestberg rwestberg commented Jan 16, 2020

Hi all,

Please review this change that sets the assignee of unassigned issues when resolving them.

Best regards,
Robin

Progress

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

Approvers

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 16, 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 (refresh this page to view it).

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 16, 2020

Webrevs

}
return Optional.of(issueProject.issueTracker().user(committerEmail.localPart()));
}
}
Copy link
Member

@edvbld edvbld Jan 16, 2020

Choose a reason for hiding this comment

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

Instead of repeating Optional.of(issueProject.issueTracker().user(...)), you might want to code this like:

        String username = null;

        var authorEmail = EmailAddress.from(commit.author().email());
        if (authorEmail.domain().equals("openjdk.org")) {
            username = authorEmail.localPart();
        } else {
            var committerEmail = EmailAddress.from(commit.committer().email());
            if (!committerEmail.domain().equals("openjdk.org")) {
                log.severe("Cannot determine issue tracker user name from committer email: " + committerEmail);
            }
            username = committerEmail.localPart();
        }

        return username == null ? Optional.empty() : Optional.of(issueProject.issueTracker().user(username));

Copy link
Member

@edvbld edvbld Jan 16, 2020

Choose a reason for hiding this comment

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

Oh, I should mention that I'm fine your version as well 👍 If you want to use your version with early return, then please remove the else { part after the return 😃

Copy link
Member Author

@rwestberg rwestberg Jan 16, 2020

Choose a reason for hiding this comment

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

Fair enough, how about this? :)

edvbld
edvbld approved these changes Jan 16, 2020
}
return Optional.of(issueProject.issueTracker().user(committerEmail.localPart()));
}
}
Copy link
Member

@edvbld edvbld Jan 16, 2020

Choose a reason for hiding this comment

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

Oh, I should mention that I'm fine your version as well 👍 If you want to use your version with early return, then please remove the else { part after the return 😃

@openjdk openjdk bot removed the rfr label Jan 16, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jan 16, 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:

Assign unassigned issues when resolving them

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 3 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 do this manually, please merge master into your branch first.

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

@openjdk openjdk bot added the ready label Jan 16, 2020
@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented Jan 16, 2020

/integrate

@openjdk openjdk bot closed this Jan 16, 2020
@openjdk openjdk bot added integrated and removed ready labels Jan 16, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Jan 16, 2020

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

  • 0624bed: Fix git 2.25 compatibility
  • 2cacefc: Fix race condition in mailman cache test
  • e6e05bc: Ensure that redirects are followed when verifying webrev links

Your commit was automatically rebased without conflicts.

Pushed as commit eb31138.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 16, 2020

Mailing list message from Robin Westberg on skara-dev:

Changeset: eb31138
Author: Robin Westberg <rwestberg at openjdk.org>
Date: 2020-01-16 11:07:05 +0000
URL: https://git.openjdk.java.net/skara/commit/eb311384

Assign unassigned issues when resolving them

Reviewed-by: ehelin

! bots/notify/src/main/java/org/openjdk/skara/bots/notify/IssueUpdater.java
! bots/notify/src/test/java/org/openjdk/skara/bots/notify/UpdaterTests.java

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