V1.2 de l'amélioration du suivi des issues

This commit is contained in:
Mathis 2026-07-12 18:27:47 +02:00
parent 599cdbba8b
commit e141309a2d

View file

@ -12,9 +12,15 @@ from utils.premium import check_premium_tier
kuby_logger = logging.getLogger("KubyBot")
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# ⚡ NOUVEAU: Utilise le même fichier que gitlab_integration.py
TRACKING_FILE = os.path.join(BASE_DIR, "commandes", "gitlab_issues.json")
LEGACY_REPORTS_FILE = os.path.join(BASE_DIR, "data", "gitlab_reports.json")
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
TRACKING_FILE = os.path.join(PROJECT_ROOT, "commandes", "gitlab_issues.json")
LEGACY_REPORTS_FILE = os.path.join(PROJECT_ROOT, "data", "gitlab_reports.json")
# S'assure que le fichier de tracking est toujours écrit à l'emplacement attendu même si le service systemd démarre depuis un autre répertoire.
if not os.path.exists(TRACKING_FILE):
legacy_candidate = os.path.join(BASE_DIR, "commandes", "gitlab_issues.json")
if os.path.exists(legacy_candidate):
TRACKING_FILE = legacy_candidate
def classify_webhook_event(payload: Dict[str, Any]) -> Optional[str]: