-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add sentry event list command + events plural alias #633
Copy link
Copy link
Open
Description
Summary
Add a list subcommand to sentry event to list events for a project, and register events as a plural alias (like issues → issue list). This is requested by users in CLI-Q3 telemetry (~6 events trying sentry event list).
Implementation Details
API Endpoint
GET /api/0/organizations/{org}/projects/{project}/events/ (project-scoped event listing)
New API Function
Add listProjectEvents to src/lib/api/events.ts:
- Paginated response using
apiRequestToRegion+parseLinkHeader - Return type:
PaginatedResponse<SentryEvent[]> - Accept org slug, project slug, and standard pagination/query options
New Command
Create src/commands/event/list.ts:
- Register as
listinsrc/commands/event/index.tsroute map - Accept optional
[<org>/<project>]target positional (auto-detect from DSN/defaults) - Support
--limit,--cursor,--query,--json,--fieldsflags - Follow existing list command patterns (org-list dispatch or standalone pagination)
Plural Alias
In src/app.ts:
- Add
events: eventListCommandto the top-level routes (importlistCommandfrom event/list.ts) - Add
events: truetohideRoute - Add
events: "event"toPLURAL_TO_SINGULAR
References
- List command patterns:
src/commands/issue/list.ts,src/commands/trace/list.ts - Event types:
src/types/sentry.ts(SentryEvent) - Plural alias pattern: see existing
issues,traces,logsinsrc/app.ts
Context
A temporary synonym suggestion for event/list exists in src/lib/command-suggestions.ts. Remove that entry once this command is implemented.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.