@@ -71,8 +71,9 @@ module.exports = async ({ github, context, core }) => {
71
71
72
72
console . log ( ">>> is_author_only_contribution_on_GH: " , {
73
73
username : author ,
74
- events_length : events . length === 0 ,
75
- events : events
74
+ events : events ,
75
+ events_length : events . length ,
76
+ result : events . length === 0 ,
76
77
} ) ;
77
78
78
79
return events . length === 0 ;
@@ -83,32 +84,40 @@ module.exports = async ({ github, context, core }) => {
83
84
let value = new Date ( ) ;
84
85
value . setHours ( value . getHours ( ) - 2 ) ;
85
86
return value ;
86
- } ) ;
87
+ } ) ( ) ;
87
88
const create_at = new Date ( user . created_at ) ;
88
89
89
90
console . log ( ">>> was_author_account_recently_created: " , {
90
91
time_point : time_point ,
91
- create_at : create_at
92
+ create_at : create_at ,
93
+ result : create_at <= time_point
92
94
} ) ;
93
95
94
96
return create_at <= time_point ;
95
97
} ) ( ) ;
96
98
99
+ console . log ( ">>> " , {
100
+ followers : user . followers ,
101
+ following : user . following ,
102
+ public_repos : user . public_repos ,
103
+ public_gists : user . public_gists
104
+ } )
105
+
97
106
const checks = [
98
107
new Check ( {
99
- predicate : ( ) => user . followers === 0 && user . following = == 0 ,
108
+ predicate : ( ) => user . followers !== 0 && user . following ! == 0 ,
100
109
reason : "Author has no relationships"
101
110
} ) ,
102
111
new Check ( {
103
- predicate : ( ) => user . public_repos === 0 && user . public_gists = == 0 ,
112
+ predicate : ( ) => user . public_repos !== 0 && user . public_gists ! == 0 ,
104
113
reason : "Author has no public reop/gist"
105
114
} ) ,
106
115
new Check ( {
107
- predicate : ( ) => WasAuthorRecentlyCreated ,
116
+ predicate : ( ) => ! WasAuthorRecentlyCreated ,
108
117
reason : "Account is less than an hour old"
109
118
} ) ,
110
119
new Check ( {
111
- predicate : ( ) => isAuthorOnlyContributionOnGH ,
120
+ predicate : ( ) => ! isAuthorOnlyContributionOnGH ,
112
121
reason : "First contribution to any GitHub project"
113
122
} ) ,
114
123
] ;
0 commit comments