Skip to content

Commit 3376dd2

Browse files
committed
[antispam] experimenting (WIP)
1 parent 2731644 commit 3376dd2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/scripts/antispam.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ class Check {
4646
this.reason = reason;
4747
}
4848

49-
async evaluate() { return await this.predicate(); }
49+
async evaluate() {
50+
const result = await this.predicate();
51+
if (typeof result !== "boolean")
52+
console.error("Check: invalid argument: not a predicate");
53+
return result;
54+
}
5055
}
5156

5257
module.exports = async ({ github, context, core }) => {

0 commit comments

Comments
 (0)