Skip to content

Commit 2aa8740

Browse files
committed
chore: refactor spam filter
Signed-off-by: Huamin Chen <[email protected]>
1 parent dddd153 commit 2aa8740

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/anti-spam-filter.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Anti-Spam Filter (Hidden Logic)
1+
name: Content Moderation
22

33
on:
44
issues:
@@ -31,8 +31,9 @@ jobs:
3131
const detectionScript = process.env.SPAM_DETECTION_SCRIPT;
3232
3333
if (!detectionScript) {
34-
core.error("SPAM_DETECTION_SCRIPT secret not found!");
35-
core.setFailed("Spam filter not configured");
34+
core.warning("SPAM_DETECTION_SCRIPT secret not configured - skipping spam detection");
35+
core.info("To enable spam filtering, set up the SPAM_DETECTION_SCRIPT secret.");
36+
core.info("See documentation for setup instructions.");
3637
return;
3738
}
3839
@@ -46,6 +47,7 @@ jobs:
4647
4748
} catch (err) {
4849
core.error(`Spam filter error: ${err.message}`);
49-
core.setFailed(`Filter execution failed: ${err.message}`);
50+
core.warning(`Filter execution failed - continuing without spam check`);
51+
// Don't fail the workflow, just log the error
5052
}
5153

.github/workflows/cleanup-existing-spam.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ jobs:
6868
6969
if (!detectionScript) {
7070
core.error("SPAM_DETECTION_SCRIPT secret not found!");
71+
core.error("The cleanup tool requires the SPAM_DETECTION_SCRIPT secret to be configured.");
72+
core.error("Please set up the secret before running cleanup.");
73+
core.error("See documentation for setup instructions.");
7174
core.setFailed("Spam detection not configured");
7275
return;
7376
}

0 commit comments

Comments
 (0)