You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
refactor: generalize resolveOrgProjectTarget to support org-all mode #860
In PR #857 (sentry explore), the command needs to resolve a target that supports all 4 modes from parseOrgProjectArg:
<org>/<project> → explicit org + project
<org>/ → org-all (no project filter)
<project> (bare) → fuzzy project search across orgs
(omitted) → auto-detect from DSN/config
The existing resolveOrgProjectTarget in src/lib/resolve-target.ts handles 3 of 4 modes but rejects org-all with a ContextError (since most commands require a project). It also returns project as required (non-optional).
This forced explore to define a local resolveExploreTarget() that's thin glue over the same shared helpers (parseOrgProjectArg + resolveProjectBySlug + resolveOrg).
When parsed.type === "org-all", return { org: parsed.org } instead of throwing. All other modes behave identically to the current resolveOrgProjectTarget.
Commands that would benefit
sentry explore — currently uses local resolveExploreTarget
Any future command that accepts <org>/ as a valid target (e.g., org-scoped analytics)
Files
src/lib/resolve-target.ts — add resolveOrgOptionalProjectTarget or extend resolveOrgProjectTarget with an options flag
src/commands/explore.ts — replace local resolveExploreTarget with the shared helper
Activity
feat: add `sentry explore` command for aggregate event queries (#857)
refactor: generalize resolveOrgProjectTarget to support org-all mode (#…