Conversation
List teams in an organization with human-readable table output (ORG, SLUG, NAME, MEMBERS) or JSON. Supports optional positional org arg, config defaults, and DSN auto-detection fallback. Also registers `sentry teams` as a shortcut alias.
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Telemetry
Other
🤖 This preview updates automatically when you update the PR. |
|
Adds the SentryTeam Zod schema, type export, and listTeams() API client function needed by the team list command.
Codecov Results 📊✅ Patch coverage is 90.64%. Project has 4080 uncovered lines. Files with missing lines (69)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 68.74% 69.08% +0.34%
==========================================
Files 105 107 +2
Lines 12992 13195 +203
Branches 0 0 —
==========================================
+ Hits 8931 9115 +184
- Misses 4061 4080 +19
- Partials 0 0 —Generated by Codecov Action |
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.
| } | ||
|
|
||
| return { orgs: [] }; | ||
| } |
There was a problem hiding this comment.
resolveOrgsToFetch duplicated across three list commands
Low Severity
The resolveOrgsToFetch function and its OrgResolution type are now copy-pasted verbatim across three files: team/list.ts, repo/list.ts, and project/list.ts. This ~50-line function contains non-trivial org resolution logic (positional arg → config defaults → DSN auto-detection → fallback) with auth error propagation. It's entirely entity-independent and could live in a shared utility (e.g., alongside resolveOrg in resolve-target.ts). Any future bug fix or behavior change to org resolution would need to be applied identically in all three places.


Summary
Adds a
sentry team listcommand to list teams in an organization, along with asentry teamsshortcut alias. Follows the same patterns asrepo list— optional positional org arg, config defaults, DSN auto-detection fallback.Changes
New command at
src/commands/team/list.tswith human-readable table output (ORG, SLUG, NAME, MEMBERS columns) and--jsonsupport. Registered in the app route map with ateamstop-level shortcut. Includes 8 unit tests covering JSON output, empty states, limit overflow, and all org resolution paths (explicit, default, DSN detection, all-orgs fallback).Test Plan