mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-22 15:23:37 +05:00
fix: trunc owner and repo name if they would overflow (#540)
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user