fix(event): Handle issue short ID as second positional arg - #1420
fix(event): Handle issue short ID as second positional arg#1420sentry[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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, | ||
| }; | ||
| } |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 932e569. Configure here.


This PR fixes an issue where
sentry event viewwould fail with aResolutionErrorwhen 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
parsePositionalArgsinpackages/cli/src/commands/event/view.tscorrectly checkedlooksLikeIssueShortId(first)for the first argument but lacked a corresponding check forlooksLikeIssueShortId(second).The fix adds this missing check. Now, when an issue short ID is detected as the second argument,
parsePositionalArgsreturns{ 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