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

401: Allow a PR author to manually add reviewers #630

Closed
wants to merge 2 commits into from

Conversation

rwestberg
Copy link
Member

@rwestberg rwestberg commented May 26, 2020

Hi all,

Please review this change that adds a /reviewer command that allows the PR author to manually add reviewers. The implementation is fairly similar to the /contributor command.

Best regards,
Robin


Progress

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

Issue

  • SKARA-401: Allow a PR author to manually add reviewers

Reviewers

Download

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 26, 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 May 26, 2020

Webrevs

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented May 26, 2020

I presume that the added reviewers don't count towards satisfying the requirement of number of reviewers?

@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented May 26, 2020

They do count, unless the project is configured to require up-to-date reviews of the latest commit (like jfx for example).

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented May 26, 2020

So it will count the same as a stale review? That seems fine.

@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented May 26, 2020

Yeah exactly, when a project is configured to ignore stale reviews it will also ignore any manually added ones.

Copy link
Member

@JornVernee JornVernee left a comment

Looks good. 2 minor suggestions inline

return;
}
if (bot.ignoreStaleReviews()) {
reply.println("This project requires authenticated reviews - please ask your reviewer to flag this PR as reviewed.");
Copy link
Member

@JornVernee JornVernee May 27, 2020

Choose a reason for hiding this comment

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

Maybe this should contain an @<pr-author> as well? (both to notify and make it clear who is being addressed).

Copy link
Member Author

@rwestberg rwestberg May 28, 2020

Choose a reason for hiding this comment

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

Yep, but all command replies are automatically prepended with @comment-author - and since the check above this one ensures that the comment author is the pr-author the message should only happen as a reply to the author of the pr.

var authenticatedReviewers = pr.reviews().stream()
.map(review -> namespace.get(review.reviewer().id()))
.map(Contributor::username)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
Copy link
Member

@JornVernee JornVernee May 27, 2020

Choose a reason for hiding this comment

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

I see this stream pipeline duplicated a few times already (in CheckablePullRequest and CheckRun). Maybe you want to move this to a helper method somewhere?

Copy link
Member Author

@rwestberg rwestberg May 28, 2020

Choose a reason for hiding this comment

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

Good point, I'll move it to somewhere common.

@openjdk
Copy link

@openjdk openjdk bot commented May 27, 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:

401: Allow a PR author to manually add reviewers

Reviewed-by: jvernee
  • 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 /issue command.

Since the source branch of this PR was last updated there has been 1 commit pushed to the master branch:

  • b03e442: 403: Allow openjdk-import to update an existing conversion

As 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 b03e44208e99961e060f1b4b4fd4f79835321c7a.

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

@openjdk openjdk bot added the ready label May 27, 2020
@rwestberg
Copy link
Member Author

@rwestberg rwestberg commented May 28, 2020

/integrate

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

@openjdk openjdk bot commented May 28, 2020

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

  • b03e442: 403: Allow openjdk-import to update an existing conversion

Your commit was automatically rebased without conflicts.

Pushed as commit f6b8bd8.

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