Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/data/action/integrations/github/github_actions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from agent_core import action
from app.utils import csv_list


# ------------------------------------------------------------------
# Issues
Expand Down Expand Up @@ -63,6 +61,7 @@ async def get_github_issue(input_data: dict) -> dict:
)
async def create_github_issue(input_data: dict) -> dict:
from app.data.action.integrations._helpers import with_client
from app.utils.text import csv_list
labels = csv_list(input_data.get("labels", ""), default=None)
assignees = csv_list(input_data.get("assignees", ""), default=None)
return await with_client(
Expand Down Expand Up @@ -138,6 +137,7 @@ async def add_github_comment(input_data: dict) -> dict:
)
async def add_github_labels(input_data: dict) -> dict:
from app.data.action.integrations._helpers import with_client
from app.utils.text import csv_list
labels = csv_list(input_data["labels"])
if not labels:
return {"status": "error", "message": "No labels provided."}
Expand Down Expand Up @@ -252,6 +252,7 @@ def set_github_watch_tag(input_data: dict) -> dict:
def set_github_watch_repos(input_data: dict) -> dict:
try:
from craftos_integrations import get_client
from app.utils.text import csv_list
client = get_client("github")
if not client or not client.has_credentials():
return {"status": "error", "message": "No GitHub credential. Use /github login first."}
Expand Down
10 changes: 5 additions & 5 deletions craftbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,26 +569,26 @@ def cmd_stop() -> None:

def cmd_status() -> None:
"""Print whether CraftBot is currently running and whether auto-start is installed."""
W = 50
W = max(50, len(LOG_FILE) + 12)
pid = _read_pid()
print(f"\n{ORANGE}╔{'═' * W}╗{RESET}")
if pid and _is_running(pid):
print(
f"{ORANGE}║{RESET} {GREEN}▸ RUNNING{RESET} {DIM}PID {pid}{RESET}{' ' * (W - 14 - len(str(pid)))}{ORANGE}║{RESET}"
f"{ORANGE}║{RESET} {GREEN}▸ RUNNING{RESET} {DIM}PID {pid}{RESET}{' ' * (W - 17 - len(str(pid)))}{ORANGE}║{RESET}"
)
print(
f"{ORANGE}║{RESET} {DIM}░░ LOG: {LOG_FILE[: W - 8]}{RESET}{' ' * max(0, W - 8 - len(LOG_FILE[: W - 8]))}{ORANGE}║{RESET}"
f"{ORANGE}║{RESET} {DIM}░░ LOG: {LOG_FILE[: W - 8]}{RESET}{' ' * max(0, W - 10 - len(LOG_FILE[: W - 8]))}{ORANGE}║{RESET}"
)
else:
if pid:
_remove_pid()
print(
f"{ORANGE}║{RESET} {RED}▸ NOT RUNNING{RESET}{' ' * (W - 14)}{ORANGE}║{RESET}"
f"{ORANGE}║{RESET} {RED}▸ NOT RUNNING{RESET}{' ' * (W - 15)}{ORANGE}║{RESET}"
)
print(f"{ORANGE}║{' ' * W}║{RESET}")
if _is_installed():
print(
f"{ORANGE}║{RESET} {GREEN}▸ AUTO-START: INSTALLED{RESET}{' ' * (W - 23)}{ORANGE}║{RESET}"
f"{ORANGE}║{RESET} {GREEN}▸ AUTO-START: INSTALLED{RESET}{' ' * (W - 25)}{ORANGE}║{RESET}"
)
else:
print(
Expand Down
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@ def _check_mac_python() -> None:

# Print retro installation header
_ART = [
" ██████╗ ██████╗ █████╗ ███████╗ ████████╗██████╗ ██████╗ ████████╗",
" ██████╗ ██████╗ █████╗ ███████╗ ████████╗██████╗ ██████╗ ████████╗",
"██╔════╝ ██╔══██╗ ██╔══██╗ ██╔════╝ ╚══██╔══╝██╔══██╗ ██╔═══██╗╚══██╔══╝",
"██║ ██████╔╝ ███████║ █████╗ ██║ ██████╔╝ ██║ ██║ ██║ ",
"██║ ██╔══██╗ ██╔══██║ ██╔══╝ ██║ ██╔══██╗ ██║ ██║ ██║ ",
Expand Down