From 4ce61c42fdefcd275f4c2b7fa389985b763bd10f Mon Sep 17 00:00:00 2001 From: Molaryy Date: Wed, 7 Jan 2026 20:00:32 +0900 Subject: [PATCH] fix(cli): clarify error when GitHub event context is missing --- packages/opencode/src/cli/cmd/github.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/github.ts b/packages/opencode/src/cli/cmd/github.ts index f6c6b688a35..6f60eae4e28 100644 --- a/packages/opencode/src/cli/cmd/github.ts +++ b/packages/opencode/src/cli/cmd/github.ts @@ -427,8 +427,12 @@ export const GithubRunCommand = cmd({ const isMock = args.token || args.event const context = isMock ? (JSON.parse(args.event!) as Context) : github.context + if (!context.eventName) { + core.setFailed("No GitHub event context found.") + process.exit(1) + } if (!SUPPORTED_EVENTS.includes(context.eventName as (typeof SUPPORTED_EVENTS)[number])) { - core.setFailed(`Unsupported event type: ${context.eventName}`) + core.setFailed(`Unsupported event type: ${context.eventName}. Supported events: ${SUPPORTED_EVENTS.join(", ")}`) process.exit(1) }