Commit ca14e7c
feat(event): add 'sentry event list' command for issue-scoped event listing (#671)
## Summary
Adds `sentry event list <issue-id>` as a top-level command for listing
events belonging to a Sentry issue. This is functionally equivalent to
`sentry issue events` but lives in the `event` route with its own
command identity.
The `sentry events` plural alias now uses Pattern A (points to the list
command directly), matching how `sentry issues` → `issue list`, `sentry
traces` → `trace list`, etc.
### Changes
- **`src/commands/event/shared-events.ts`** (new) — Shared types,
constants, formatters, table columns, and flag definitions extracted
from `issue/events.ts`
- **`src/commands/event/list.ts`** (new) — The `event list` command with
correct command identity (pagination hints, error messages)
- **`src/commands/issue/events.ts`** — Refactored to import shared parts
(no behavior change)
- **`src/commands/issue/utils.ts`** — `buildCommandHint` and
`resolveIssue` accept optional `commandBase` parameter
- **`src/commands/event/index.ts`** — Added `list` route alongside
`view`
- **`src/app.ts`** — Changed `events` alias from `eventRoute` (Pattern
B) to `eventListCommand` (Pattern A)
- **`src/lib/command-suggestions.ts`** — Removed `event/list` synonym
(now a real command)
### Usage
```bash
sentry event list CLI-G5
sentry event list @latest --limit 50
sentry event list CLI-G5 --full --json
sentry event list CLI-G5 -q "user.email:foo@bar.com"
sentry events CLI-G5 # plural alias → event list
```
### Follow-up: org-scoped event listing
This PR covers issue-scoped event listing only. A follow-up issue will
track expanding `event list` to support org-scoped queries via the
Discover/Events API (`/organizations/{org}/events/`), enabling patterns
like `sentry event list <org>/ --dataset errors`.
Closes #632
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 0108c1e commit ca14e7c
File tree
35 files changed
+856
-324
lines changed- docs/src/content/docs/commands
- plugins/sentry-cli/skills/sentry-cli
- references
- src
- commands
- event
- issue
- log
- span
- trace
- lib
- test
- commands/event
- lib
35 files changed
+856
-324
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
28 | 49 | | |
29 | 50 | | |
30 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| |||
0 commit comments