Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/libkernelbot/launchers/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def patched_create_dispatch(
status, _, _ = workflow._requester.requestJson(
"POST", f"{workflow.url}/dispatches", input={"ref": ref, "inputs": inputs}
)
return status == 200

return status == 200 or status == 204



Comment on lines +209 to 212
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function returns a boolean indicating success based only on status codes 200 or 204, but returns False for all other status codes without providing any information about what went wrong. Consider logging the actual status code when it's not 200 or 204, or raising an exception with details about the failure to help with debugging when workflow dispatch fails.

Suggested change
return status == 200 or status == 204
if status == 200 or status == 204:
return True
logger.error(
"Workflow dispatch failed for '%s' (ref=%s) with HTTP status %s",
getattr(workflow, "path", workflow),
ref,
status,
)
return False

Copilot uses AI. Check for mistakes.
class GitHubRun:
Expand Down
Loading