babel-bot
babel-bot copied to clipboard
Add assignee (reviewer) to PRs
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
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.