File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed
plugins/sentry-cli/skills/sentry-cli Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,33 @@ List repositories
440440- ` -n, --limit <value> - Maximum number of repositories to list - (default: "30") `
441441- ` --json - Output JSON `
442442
443+ ### Team
444+
445+ Work with Sentry teams
446+
447+ #### ` sentry team list <org> `
448+
449+ List teams
450+
451+ ** Flags:**
452+ - ` -n, --limit <value> - Maximum number of teams to list - (default: "30") `
453+ - ` --json - Output JSON `
454+
455+ ** Examples:**
456+
457+ ``` bash
458+ # Auto-detect organization or list all
459+ sentry team list
460+
461+ # List teams in a specific organization
462+ sentry team list < org-slug>
463+
464+ # Limit results
465+ sentry team list --limit 10
466+
467+ sentry team list --json
468+ ```
469+
443470### Log
444471
445472View Sentry logs
@@ -594,6 +621,18 @@ List repositories
594621- ` -n, --limit <value> - Maximum number of repositories to list - (default: "30") `
595622- ` --json - Output JSON `
596623
624+ ### Teams
625+
626+ List teams
627+
628+ #### ` sentry teams <org> `
629+
630+ List teams
631+
632+ ** Flags:**
633+ - ` -n, --limit <value> - Maximum number of teams to list - (default: "30") `
634+ - ` --json - Output JSON `
635+
597636### Logs
598637
599638List logs from a project
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ import {
2727 SentryProjectSchema ,
2828 type SentryRepository ,
2929 SentryRepositorySchema ,
30+ type SentryTeam ,
31+ SentryTeamSchema ,
3032 type SentryUser ,
3133 SentryUserSchema ,
3234 type TraceSpan ,
@@ -602,6 +604,16 @@ export function listRepositories(orgSlug: string): Promise<SentryRepository[]> {
602604 ) ;
603605}
604606
607+ /**
608+ * List teams in an organization.
609+ * Uses region-aware routing for multi-region support.
610+ */
611+ export function listTeams ( orgSlug : string ) : Promise < SentryTeam [ ] > {
612+ return orgScopedRequest < SentryTeam [ ] > ( `/organizations/${ orgSlug } /teams/` , {
613+ schema : z . array ( SentryTeamSchema ) ,
614+ } ) ;
615+ }
616+
605617/**
606618 * Search for projects matching a slug across all accessible organizations.
607619 *
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export type {
7474 SentryOrganization ,
7575 SentryProject ,
7676 SentryRepository ,
77+ SentryTeam ,
7778 SentryUser ,
7879 Span ,
7980 StackFrame ,
@@ -114,6 +115,7 @@ export {
114115 SentryOrganizationSchema ,
115116 SentryProjectSchema ,
116117 SentryRepositorySchema ,
118+ SentryTeamSchema ,
117119 SentryUserSchema ,
118120 SpanSchema ,
119121 StackFrameSchema ,
Original file line number Diff line number Diff line change @@ -810,3 +810,22 @@ export const SentryRepositorySchema = z
810810 . passthrough ( ) ;
811811
812812export type SentryRepository = z . infer < typeof SentryRepositorySchema > ;
813+
814+ // Team
815+
816+ /** A team in a Sentry organization */
817+ export const SentryTeamSchema = z
818+ . object ( {
819+ // Core identifiers (required)
820+ id : z . string ( ) ,
821+ slug : z . string ( ) ,
822+ name : z . string ( ) ,
823+ // Optional metadata
824+ dateCreated : z . string ( ) . optional ( ) ,
825+ isMember : z . boolean ( ) . optional ( ) ,
826+ teamRole : z . string ( ) . nullable ( ) . optional ( ) ,
827+ memberCount : z . number ( ) . optional ( ) ,
828+ } )
829+ . passthrough ( ) ;
830+
831+ export type SentryTeam = z . infer < typeof SentryTeamSchema > ;
You can’t perform that action at this time.
0 commit comments