V1.2 de l'amélioration du suivi des issues #268
1 changed files with 9 additions and 3 deletions
|
|
@ -12,9 +12,15 @@ from utils.premium import check_premium_tier
|
||||||
|
|
||||||
kuby_logger = logging.getLogger("KubyBot")
|
kuby_logger = logging.getLogger("KubyBot")
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
# ⚡ NOUVEAU: Utilise le même fichier que gitlab_integration.py
|
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||||
TRACKING_FILE = os.path.join(BASE_DIR, "commandes", "gitlab_issues.json")
|
TRACKING_FILE = os.path.join(PROJECT_ROOT, "commandes", "gitlab_issues.json")
|
||||||
LEGACY_REPORTS_FILE = os.path.join(BASE_DIR, "data", "gitlab_reports.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]:
|
def classify_webhook_event(payload: Dict[str, Any]) -> Optional[str]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue