@@ -30,23 +30,14 @@ ${reasons}
30
30
31
31
console . log ( ">>> DEBUG:\n" , commentBody ) ;
32
32
33
- // await github.rest.issues.createComment({
34
- // owner,
35
- // repo,
36
- // issue_number: issueNumber,
37
- // body: commentBody
38
- // });
39
-
40
-
41
- // TODO: if too many checks failed, then consider immediatly closing:
33
+ // TODO: if too many or critical checks failed, then consider immediatly closing:
42
34
43
35
// await github.rest.issues.update({
44
36
// owner,
45
37
// repo,
46
38
// issue_number: issueNumber,
47
39
// state: "closed"
48
40
// });
49
-
50
41
}
51
42
52
43
class Check {
@@ -100,8 +91,8 @@ module.exports = async ({ github, context, core }) => {
100
91
} ) ( ) ;
101
92
102
93
const checks = [
103
- new Check ( { predicate : was_author_account_recently_created , reason : "Account is less than an hour old" } ) ,
104
- new Check ( { predicate : is_author_only_contribution_on_GH , reason : "First contribution to any GitHub project" } ) ,
94
+ new Check ( { predicate : ( ) => was_author_account_recently_created ( ) , reason : "Account is less than an hour old" } ) ,
95
+ new Check ( { predicate : ( ) => is_author_only_contribution_on_GH ( ) , reason : "First contribution to any GitHub project" } ) ,
105
96
new Check ( { predicate : ( ) => user . followers === 0 && user . following === 0 , reason : "Author has no relationships" } ) ,
106
97
new Check ( { predicate : ( ) => user . public_repos === 0 && user . public_gists === 0 , reason : "Author has no public reop/gist" } ) ,
107
98
] ;
0 commit comments