Merge branch 'main' of https://floke-gitea.duckdns.org/Floke/Brancheneinstufung2
# Conflicts: # company-explorer/frontend/src/components/Inspector.tsx # company-explorer/frontend/src/components/RoboticsSettings.tsx
This commit is contained in:
@@ -9,7 +9,8 @@ import subprocess
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
try:
|
||||
from dev_session import add_comment_to_notion_task
|
||||
from dev_session import add_comment_to_notion_task, decimal_hours_to_hhmm
|
||||
from datetime import datetime
|
||||
except ImportError:
|
||||
print("Fehler: Konnte dev_session.py nicht importieren.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
@@ -43,6 +44,7 @@ def main():
|
||||
|
||||
task_id = session_data.get("task_id")
|
||||
token = session_data.get("token")
|
||||
session_start_time_str = session_data.get("session_start_time")
|
||||
|
||||
if not task_id or not token:
|
||||
sys.exit(0)
|
||||
@@ -50,8 +52,16 @@ def main():
|
||||
commit_message = get_last_commit_message()
|
||||
|
||||
if commit_message:
|
||||
time_comment = ""
|
||||
if session_start_time_str:
|
||||
session_start_time = datetime.fromisoformat(session_start_time_str)
|
||||
elapsed_time = datetime.now() - session_start_time
|
||||
elapsed_hours = elapsed_time.total_seconds() / 3600
|
||||
elapsed_hhmm = decimal_hours_to_hhmm(elapsed_hours)
|
||||
time_comment = f"⏱️ Arbeitszeit in dieser Session: {elapsed_hhmm}\\n"
|
||||
|
||||
# Formatieren der Nachricht für Notion
|
||||
comment = f"✅ New Commit:\n---\n{commit_message}"
|
||||
comment = f"✅ New Commit:\\n{time_comment}---\\n{commit_message}"
|
||||
add_comment_to_notion_task(token, task_id, comment)
|
||||
|
||||
except (FileNotFoundError, json.JSONDecodeError):
|
||||
|
||||
Reference in New Issue
Block a user