feat(issue): add sentry issue events command (#632)#654
Conversation
…issue (#632) Add a new subcommand `sentry issue events <issue>` that lists events belonging to a specific Sentry issue. This was the most requested unknown command in CLI telemetry. - Add IssueEvent type and IssueEventSchema for the list endpoint response - Add listIssueEvents() API function with auto-pagination support - Create events command with table output (EVENT ID, TIMESTAMP, TITLE, PLATFORM, USER) and standard JSON envelope - Support all issue ID formats (@latest, short IDs, numeric, org/ID) - Include --limit, --query, --full, --period, --cursor, --fresh flags - Bidirectional pagination via cursor-stack infrastructure - 16 unit tests covering JSON/human output, pagination, and edge cases - Regenerate SKILL.md with new command documentation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
The drift detection test requires all commands with org-positional parameters to be registered in the completion set.
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 82.94%. Project has 1433 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.62% 95.50% -0.12%
==========================================
Files 219 220 +1
Lines 31570 31870 +300
Branches 0 0 —
==========================================
+ Hits 30189 30437 +248
- Misses 1381 1433 +52
- Partials 0 0 —Generated by Codecov Action |
…ueEvents When the API returns more events than the requested limit, the function now returns without nextCursor to prevent cursor-position skips. This matches the pattern in listIssuesAllPages.
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 01ce094. Configure here.
The issue events API has no per-page limit parameter, so the server may return more events than requested. Preserve nextCursor so the command-level cursor stack can navigate to subsequent API pages.

Summary
Add
sentry issue events <issue>subcommand to list events for a specific Sentry issue. This was the most requested unknown command in CLI telemetry (~20 events from users tryingsentry issue events <issue-id>).Closes #632
Changes
IssueEventtype +IssueEventSchemainsrc/types/sentry.ts— lightweight type matching the list endpoint response (not the fullSentryEvent)listIssueEvents()insrc/lib/api/events.ts— uses@sentry/api'slistAnIssue_sEventswith auto-pagination when limit > 100src/commands/issue/events.ts— built withbuildListCommand, standard cursor-stack pagination, table outputsrc/commands/issue/index.tstest/commands/issue/events.func.test.tsFlags
--limit-n25--query-q--fullfalse--period-t"7d"--cursor-c--fresh-ffalseTable Output
Note on time range filtering
The API supports
start/end(absolute ISO-8601) in addition tostatsPeriod(relative). A user requested date/time window filtering in the issue comments.--periodis included since it's standard across 6 existing commands.--start/--endis deferred as a cross-cutting feature (no CLI command has it today).