-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
59 lines (51 loc) · 1.24 KB
/
config.py
File metadata and controls
59 lines (51 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""Configuration settings for PR-Sentinel."""
import os
from dotenv import load_dotenv
load_dotenv()
# GitHub Configuration
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN", "")
GITHUB_WEBHOOK_SECRET = os.getenv("GITHUB_WEBHOOK_SECRET", "")
# Spam Detection Thresholds
SPAM_SCORE_THRESHOLD = float(os.getenv("SPAM_SCORE_THRESHOLD", "70"))
# Storage Configuration
PR_TRACKING_FILE = os.getenv("PR_TRACKING_FILE", "pr_tracking.json")
MAX_TRACKED_PRS = int(os.getenv("MAX_TRACKED_PRS", "100"))
# Server Configuration
HOST = os.getenv("HOST", "0.0.0.0")
PORT = int(os.getenv("PORT", "8000"))
# Spam Detection Weights
WEIGHTS = {
"trivial_readme": 30,
"minimal_changes": 25,
"generic_ai_text": 35,
"suspicious_patterns": 10
}
# AI Text Indicators
AI_TEXT_INDICATORS = [
"as an ai",
"i don't have personal",
"i cannot",
"i apologize",
"it's worth noting",
"it is important to note",
"in conclusion",
"to summarize",
"in summary",
"furthermore",
"moreover",
"additionally",
"consequently",
"delve into",
"navigate",
"landscape",
"realm",
"tapestry"
]
# Suspicious Patterns
SUSPICIOUS_PATTERNS = [
"typo fix",
"fixed typo",
"minor fix",
"small change",
"quick fix"
]