babel-bot icon indicating copy to clipboard operation
babel-bot copied to clipboard

Add assignee (reviewer) to PRs

Open xtuc opened this issue 8 years ago • 1 comments

The Facebook/mention-bot offers a programmatic API (source).

It think we could easily integrate it in the Babel-bot.

Usage example:

mentionBot
  .guessOwnersForPullRequest(
    'https://github.com/babel/babel', // repo
    65, // pull request number
    'babel-bot', // user that created the pull request
    'master', // branch
    { maxReviewers: 3 }, // config
    [...]
  )
  .then(function(users) {
    // array with user names which should be included in review
    console.log(users);
  })
  .catch(function(err) {
    console.error(err);
  });

It will be triggered in src/handlers/pull_request/opened.js.

Instead of babel/babel#5057

xtuc avatar Jan 08 '17 13:01 xtuc

Let's keep using the free hosted version for now, to save on costs for the babel-bot Lambda function. We can always switch over later.

DrewML avatar Jan 15 '17 21:01 DrewML