Skip to content

Commit cb523d0

Browse files
committed
[antispam] experimenting (WIP)
1 parent 9ba01b1 commit cb523d0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/scripts/antispam.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ module.exports = async ({ github, context, core }) => {
8686
return create_at >= time_point;
8787
})();
8888

89+
const isTitleOrBodyTooShort = (() => {
90+
const payload = context.payload;
91+
const title = payload.issue?.title || payload.pull_request?.title || "";
92+
const body = payload.issue?.body || payload.pull_request?.body || "";
93+
return title.length < 20 || body.length < 20;
94+
})();
95+
96+
console.log(">>> DEBUG", context)
97+
8998
const checks = [
9099
new Check({
91100
predicate: () => user.followers !== 0 && user.following !== 0,

0 commit comments

Comments
 (0)