feat(cli): Name filter (glob + fuzzy) for project, team, repo and other list commands

Aperta
#1,554 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cli, typescript
Ambito
cli

Direzione di ricerca

Start with packages/cli/src/lib/list-filter.ts and the existing org list implementation to see how filtering and pagination work. Then trace project list and buildOrgListCommand for the listed commands, including how positional arguments and --cursor are handled. Done means the requested filters work with pagination, --limit, and --platform as described; the issue leaves dashboard fuzzy filtering as a separate decision.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Follow-up from review of #1537 (thread).

sentry org list [filter] filters organizations by slug or name: a glob (acme-*) has to match a whole slug or name, and plain text goes through the shared fuzzy search (exact, prefix, substring, then small typos). #1537 moved that logic into packages/cli/src/lib/list-filter.ts (filterByName) so other list commands can use it. Right now only org list does.

Proposal

Add the same name filter to the other list commands, as an optional positional argument after the target, following sentry dashboard list [<org/project>] [<name-glob>]:

sentry project list my-org/ 'web-*'     # glob on project slug or name
sentry project list my-org/ frontnd     # fuzzy: finds "frontend"
sentry project list 'web-*'             # auto-detected org(s); a glob can't be a slug, so it's a filter
sentry team list my-org/ backend
sentry repo list my-org/ 'sentry-*'

Commands:

  • project list: slug and name
  • org-list framework commands (buildOrgListCommand): team list, repo list, monitor list, integration list
  • dashboard list: already has glob-only title filtering applied while it pages; switching it to filterByName (adding fuzzy text) is a separate decision because it filters page by page

Open questions and constraints

  • Pagination: fuzzy ranking needs the whole set, so a filter fetches every page. --cursor with a filter should be rejected rather than filtering one page at a time. --limit applies after filtering, as it does in org list.
  • Argument grammar: a single bare argument is still a project search (sentry project list web). Only a second positional, or a single argument containing glob characters, is treated as a filter.
  • --platform: project list --platform stays as it is and combines with the name filter.

via byk.

--

View Junior Session [Sentry]

Lingua principale
TypeScript
Stelle
961
Fork
179
Merge medio
15h 33m
PR unite (30g)
476

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/toolkit

Tutte le issue di getsentry/toolkit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.