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

wpt-pr-bot can assign a PR to the author if they 'reviewed' it last #142

Open
stephenmcgruer opened this issue Jan 27, 2020 · 0 comments
Open

Comments

@stephenmcgruer
Copy link
Contributor

This just happened in web-platform-tests/wpt#21194 (comment)

I believe what happened is in lib/metadata/choose-assignee.js, there is the following code:

    // Check for existing reviews and grab the reviewer who "touched it last".
    var reviews = metadata.reviews;
    if (reviews && reviews.length) {
      return reviews[reviews.length - 1].user.login;
    }

    var reviewers = metadata.reviewersExcludingAuthor;
    if (reviewers.length) {
      var index = Math.floor(Math.random() * reviewers.length);
      return reviewers[index].login;
    }

The first conditional fails to make sure that the user.login it chooses is not in metadata.reviewersExcludingAuthor...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant