@@ -4,7 +4,7 @@ const configuration = {
4
4
close_if_suspicious : false ,
5
5
} ;
6
6
7
- async function collect_user_information_report ( { user } ) {
7
+ async function make_information_report ( { user } ) {
8
8
// we might also create a (pre-)report for spam to GH using the following informations:
9
9
return `> [!WARNING] About the author:
10
10
>
@@ -154,7 +154,6 @@ module.exports = async ({ github, context, core }) => {
154
154
// then use a weights/factors instead of booleans,
155
155
// compute a confidence score to check against a threshold => if below, then reject
156
156
157
-
158
157
async function processFailedChecks ( checks ) {
159
158
const results = await Promise . all (
160
159
checks . map ( async ( check ) => ( {
@@ -164,7 +163,6 @@ module.exports = async ({ github, context, core }) => {
164
163
) ;
165
164
return results . filter ( ( { passed } ) => passed ) . map ( ( { check } ) => check ) ;
166
165
}
167
- // const failed_checks = checks.filter(check => ! check.pass());
168
166
169
167
processFailedChecks ( checks ) . then ( failed_checks => {
170
168
const threshold = 0 ;
@@ -175,7 +173,8 @@ module.exports = async ({ github, context, core }) => {
175
173
176
174
when_suspicious ( { github, context, failed_checks} ) ;
177
175
178
- const user_information_as_comment = collect_user_information_report ( ) ;
176
+ const user_information_as_comment = make_information_report ( { user : user } ) ;
179
177
// do stuffs with user_information_as_comment
178
+ console . log ( "user_information_as_comment" , user_information_as_comment ) ;
180
179
} ) ;
181
180
} ;
0 commit comments