Skip to content

fix(event): Handle issue short ID as second positional arg - #1420

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/event-view-short-id-second-arg
Open

fix(event): Handle issue short ID as second positional arg#1420
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/event-view-short-id-second-arg

Conversation

@sentry

@sentry sentry Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR fixes an issue where sentry event view would fail with a ResolutionError when an issue short ID (e.g., PRODUCTION-RCP-API-A9R) was passed as the second positional argument (e.g., sentry event view <org>/<project> PRODUCTION-RCP-API-A9R).

The root cause was that parsePositionalArgs in packages/cli/src/commands/event/view.ts correctly checked looksLikeIssueShortId(first) for the first argument but lacked a corresponding check for looksLikeIssueShortId(second).

The fix adds this missing check. Now, when an issue short ID is detected as the second argument, parsePositionalArgs returns { eventId: LATEST_EVENT_SENTINEL, targetArg: first, issueShortId: second }, allowing the command to correctly resolve the latest event for that issue, preventing the misleading "is not a valid ID" error.

Fixes CLI-1EJ

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 13, 2026 10:43pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 932e569. Configure here.

issueShortId: second,
extraEventIds,
};
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Specified org ignored for short IDs

High Severity

When an issue short ID is the second argument with an org/project target, parsePositionalArgs preserves that target, but resolveIssueShortcut only uses the org for org-all targets. The specified org is dropped and resolution falls back to auto-detection, so the lookup can miss or hit the wrong organization.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 932e569. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants