Skip to content

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

Open
@stephenmcgruer

Description

@stephenmcgruer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions