fix: trunc owner and repo name if they would overflow (#540)

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2024-09-22 08:58:44 +02:00
committed by GitHub
parent df414ce37e
commit 4b17c68454
2 changed files with 9 additions and 3 deletions

View File

@@ -177,3 +177,9 @@ def moonraker_exists(name: str = "") -> bool:
)
return False
return True
def trunc_string(input_str: str, length: int) -> str:
if len(input_str) > length:
return f"{input_str[:length - 3]}..."
return input_str