From 932e569efa4582c6eb2e925ddfccc5c509f1e11d Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 22:42:25 +0000 Subject: [PATCH] fix(event): Handle issue short ID as second positional arg --- packages/cli/src/commands/event/view.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/cli/src/commands/event/view.ts b/packages/cli/src/commands/event/view.ts index a1a85bbaa..05fa7d21f 100644 --- a/packages/cli/src/commands/event/view.ts +++ b/packages/cli/src/commands/event/view.ts @@ -453,6 +453,19 @@ export function parsePositionalArgs(args: string[]): ParsedPositionalArgs { }; } + // Detect issue short ID as second arg (e.g., "my-org/my-project BRUNCHIE-APP-29"). + // Auto-redirect to that issue's latest event instead of treating the short + // ID as an event hex ID (which would fail validation). + if (looksLikeIssueShortId(second)) { + const extraEventIds = args.length > 2 ? args.slice(2) : undefined; + return { + eventId: LATEST_EVENT_SENTINEL, + targetArg: first, + issueShortId: second, + extraEventIds, + }; + } + // Two or more args - first is target, second is event ID. // Any additional args are extra event IDs (from newline-separated input). const extraEventIds = args.length > 2 ? args.slice(2) : undefined;