Skip to content

feat(team): add team list command#238

Merged
betegon merged 4 commits intomainfrom
feat/team-list
Feb 13, 2026
Merged

feat(team): add team list command#238
betegon merged 4 commits intomainfrom
feat/team-list

Conversation

@betegon
Copy link
Member

@betegon betegon commented Feb 12, 2026

Summary

Adds a sentry team list command to list teams in an organization, along with a sentry teams shortcut alias. Follows the same patterns as repo list — optional positional org arg, config defaults, DSN auto-detection fallback.

Changes

New command at src/commands/team/list.ts with human-readable table output (ORG, SLUG, NAME, MEMBERS columns) and --json support. Registered in the app route map with a teams top-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

bun test test/commands/team/list.test.ts   # 8 tests pass
bun run typecheck                          # clean
bun run lint                               # clean

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.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (formatters) Add Seer fixability score to issue list and detail views by betegon in #234
  • (team) Add team list command by betegon in #238

Bug Fixes 🐛

Telemetry

  • Use SDK session integration instead of manual management by BYK in #232
  • Correct runtime context for Bun binary by BYK in #231

Other

  • (setup) Use correct auth command in install welcome message by betegon in #241
  • (tests) Centralize test config dir lifecycle to prevent env var pollution by BYK in #242

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/pr-preview/pr-238/

Built to branch gh-pages at 2026-02-13 17:52 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Adds the SentryTeam Zod schema, type export, and listTeams()
API client function needed by the team list command.
@betegon betegon marked this pull request as ready for review February 13, 2026 17:52
@github-actions
Copy link
Contributor

Codecov Results 📊

✅ Patch coverage is 90.64%. Project has 4080 uncovered lines.
✅ Project coverage is 69.08%. Comparing base (base) to head (head).

Files with missing lines (69)
File Patch % Lines
human.ts 58.29% ⚠️ 395 Missing
resolve-target.ts 20.26% ⚠️ 366 Missing
list.ts 14.39% ⚠️ 345 Missing
api-client.ts 65.99% ⚠️ 234 Missing
list.ts 23.47% ⚠️ 212 Missing
oauth.ts 30.68% ⚠️ 183 Missing
list.ts 21.96% ⚠️ 167 Missing
plan.ts 19.37% ⚠️ 154 Missing
resolver.ts 3.23% ⚠️ 120 Missing
help.ts 19.85% ⚠️ 109 Missing
upgrade.ts 57.71% ⚠️ 107 Missing
view.ts 36.48% ⚠️ 101 Missing
interactive-login.ts 9.17% ⚠️ 99 Missing
errors.ts 5.94% ⚠️ 95 Missing
view.ts 25.81% ⚠️ 92 Missing
view.ts 39.44% ⚠️ 86 Missing
clipboard.ts 4.49% ⚠️ 85 Missing
status.ts 24.07% ⚠️ 82 Missing
migration.ts 47.44% ⚠️ 82 Missing
list.ts 27.18% ⚠️ 75 Missing
browser.ts 4.11% ⚠️ 70 Missing
login.ts 33.33% ⚠️ 64 Missing
span-tree.ts 5.00% ⚠️ 57 Missing
explain.ts 33.33% ⚠️ 56 Missing
api.ts 89.80% ⚠️ 47 Missing
upgrade.ts 66.91% ⚠️ 46 Missing
telemetry.ts 84.72% ⚠️ 46 Missing
seer.ts 75.54% ⚠️ 45 Missing
schema.ts 89.56% ⚠️ 40 Missing
refresh.ts 40.63% ⚠️ 38 Missing
seer.ts 79.87% ⚠️ 30 Missing
preload.ts 53.23% ⚠️ 29 Missing
view.ts 87.27% ⚠️ 28 Missing
utils.ts 88.94% ⚠️ 25 Missing
view.ts 61.54% ⚠️ 25 Missing
detector.ts 90.10% ⚠️ 20 Missing
binary.ts 88.67% ⚠️ 17 Missing
list.ts 91.16% ⚠️ 16 Missing
list.ts 90.70% ⚠️ 16 Missing
code-scanner.ts 95.00% ⚠️ 16 Missing
help.ts 57.14% ⚠️ 15 Missing
arg-parsing.ts 90.00% ⚠️ 12 Missing
dsn-cache.ts 94.62% ⚠️ 12 Missing
logout.ts 56.00% ⚠️ 11 Missing
token.ts 52.17% ⚠️ 11 Missing
fix.ts 83.61% ⚠️ 10 Missing
qrcode.ts 33.33% ⚠️ 10 Missing
fs-utils.ts 57.14% ⚠️ 9 Missing
view.ts 94.70% ⚠️ 7 Missing
project-root.ts 97.73% ⚠️ 7 Missing
version-check.ts 91.76% ⚠️ 7 Missing
feedback.ts 84.21% ⚠️ 6 Missing
auth.ts 95.52% ⚠️ 6 Missing
shell.ts 96.23% ⚠️ 6 Missing
app.ts 93.90% ⚠️ 5 Missing
setup.ts 97.84% ⚠️ 4 Missing
list.ts 97.33% ⚠️ 4 Missing
index.ts 95.96% ⚠️ 4 Missing
project-aliases.ts 97.40% ⚠️ 2 Missing
project-root-cache.ts 96.92% ⚠️ 2 Missing
output.ts 89.47% ⚠️ 2 Missing
alias.ts 99.42% ⚠️ 1 Missing
completions.ts 99.37% ⚠️ 1 Missing
env-file.ts 99.19% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
colors.ts 98.21% ⚠️ 1 Missing
trace.ts 99.16% ⚠️ 1 Missing
helpers.ts 97.62% ⚠️ 1 Missing
helpers.ts 94.74% ⚠️ 1 Missing
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

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: [] };
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow up.

@betegon betegon merged commit 964c105 into main Feb 13, 2026
24 checks passed
@betegon betegon deleted the feat/team-list branch February 13, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant