-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.js
26 lines (21 loc) · 800 Bytes
/
plugin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module.exports = function (poppins) {
var plugins = poppins.plugins;
if (!plugins.prChecklist) {
throw new Error('poppins-check-cla requires poppins-pr-checklist to be loaded first');
}
plugins.checkCla = {
message:
"Contributor [signed CLA]" +
"(https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#signing-the-cla)" +
" now or in the past\n" +
" - If you've already signed, leave a comment here with your real name. Thanks!",
condition: function (data) {
return poppins.getContributors().then(function (contributors) {
return contributors.some(function (user) {
return user.login === data.pull_request.user.login;
});
});
}
};
plugins.prChecklist.checks.push(plugins.checkCla);
};