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

Merged
Gameur merged 1 commit from dev into main 2026-07-12 16:28:03 +00:00
Showing only changes of commit e141309a2d - Show all commits

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]: