@@ -46,7 +46,7 @@ class Check {
46
46
this . reason = reason ;
47
47
}
48
48
49
- async evaluate ( ) {
49
+ async pass ( ) {
50
50
const result = await this . predicate ( ) ;
51
51
if ( typeof result !== "boolean" )
52
52
console . error ( "Check: invalid argument: not a predicate" ) ;
@@ -90,10 +90,10 @@ module.exports = async ({ github, context, core }) => {
90
90
console . log ( ">>> was_author_account_recently_created: " , {
91
91
time_point : time_point ,
92
92
create_at : create_at ,
93
- result : create_at < = time_point
93
+ result : create_at > = time_point
94
94
} ) ;
95
95
96
- return create_at < = time_point ;
96
+ return create_at > = time_point ;
97
97
} ) ( ) ;
98
98
99
99
console . log ( ">>> " , {
@@ -110,7 +110,7 @@ module.exports = async ({ github, context, core }) => {
110
110
} ) ,
111
111
new Check ( {
112
112
predicate : ( ) => user . public_repos !== 0 && user . public_gists !== 0 ,
113
- reason : "Author has no public reop /gist"
113
+ reason : "Author has no public repo /gist"
114
114
} ) ,
115
115
new Check ( {
116
116
predicate : ( ) => ! WasAuthorRecentlyCreated ,
@@ -123,7 +123,7 @@ module.exports = async ({ github, context, core }) => {
123
123
] ;
124
124
125
125
// IDEA: use weight instead of booleans
126
- const failed_checks = checks . filter ( check => check . evaluate ( ) ) ;
126
+ const failed_checks = checks . filter ( check => ! check . pass ( ) ) ;
127
127
128
128
const threshold = 0 ;
129
129
console . log ( ">>> failed_checks amount: " , failed_checks . length , "vs. threshold: " , threshold )
0 commit comments