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

Ouverte
#1,554 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
cli, typescript
Domaine
cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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]

Langage dominant
TypeScript
Étoiles
961
Forks
179
Merge moyen
15 h 33 min
PR mergées (30 j)
476

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de getsentry/toolkit

Toutes les issues de getsentry/toolkit

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.