Skip to content

feat(cli): Name filter for project, team, repo, monitor and integration lists - #1575

Open
sentry-junior[bot] wants to merge 2 commits into
mainfrom
feat/cli-list-name-filter
Open

sentry-junior[bot] wants to merge 2 commits into
mainfrom
feat/cli-list-name-filter

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Brings sentry org list [filter]'s name filter (glob, or fuzzy text through filterByName) to the other org-scoped list commands. It's an optional second positional, following the sentry dashboard list [<org/project>] [<name-glob>] pattern. Refs #1554, from this review thread.

sentry project list my-org/ 'web-*'   # glob on slug or name
sentry team list my-org/ backnd       # fuzzy: finds "backend"
sentry project list 'web-*'           # lone glob: auto-detected org(s)
sentry repo list my-org/ '*-sdk'      # * also matches / (repo names are owner/name)

How it works

  • OrgListConfig.namesOf opts a buildOrgListCommand command in. That covers team, repo, monitor, and integration list. With a filter, the default handlers wrap the config's fetchers with filterByName. entityPlural becomes teams matching 'x', so progress, empty-result, and count messages say what was matched.
  • project list overrides every dispatch mode, so it gets the filter as ctx.filter and applies it in its own handlers, together with --platform.
  • Pagination: matching and fuzzy ranking need the whole set. With a filter, <org>/ fetches every page instead of one cursor page, and --cursor with a filter is rejected with a ValidationError. --limit applies to the matches, as in org list. Tips that point at the unfiltered paginated <org>/ listing are left out when a filter is set.
  • Argument grammar: splitListTargetAndFilter treats a lone glob (web-*) or <org>/<glob> as a filter, since no slug contains glob characters. A lone bare name (sentry project list web) is still a project search, so nothing existing changes meaning.
  • Glob * now also matches / (picomatch bash: true). Names aren't paths, and repository names are owner/name.

Not in this PR: dashboard list still uses its own glob-only title filter, applied while it pages through server results. Moving it to filterByName would add fuzzy matching but changes its paging behaviour, so it's left for a follow-up under #1554.

Testing: new tests cover splitListTargetAndFilter, the dispatcher's filter path (fetch everything, fuzzy ranking, --limit, project scope, --cursor rejection, ctx.filter for overrides), project list end to end (glob, fuzzy, <org>/<glob>, --platform, --limit, empty hint, --cursor), and team list wiring. tsc, oxlint, and oxfmt are clean. Generated command docs and skills are regenerated. The full local test/lib + test/commands run fails only in tests that also fail locally without this change (sandbox permissions and the require-shim loader); the check-* scripts pass when run directly.

via BYK.

--

View Junior Session [Sentry]

…on lists

Bring `sentry org list [filter]`'s name filter to the other org-scoped
list commands, as an optional second positional:

  sentry project list my-org/ 'web-*'   # glob on slug or name
  sentry team list my-org/ backnd       # fuzzy text
  sentry project list 'web-*'           # lone glob: auto-detected org(s)

- `OrgListConfig.namesOf` opts a `buildOrgListCommand` command in (team,
  repo, monitor, integration); its default handlers filter each fetched
  set with `filterByName`. `project list` applies it in its own handlers,
  together with `--platform`.
- Matching and fuzzy ranking need the whole set, so `<org>/` with a filter
  fetches every page instead of one cursor page, and `--cursor` with a
  filter is rejected. `--limit` applies to the matches.
- `splitListTargetAndFilter` treats a lone glob (or `<org>/<glob>`) as a
  filter, since no slug contains glob characters. A lone bare name is
  still a project search.
- Glob `*` now also matches `/`, so `*-sdk` matches repository names like
  `getsentry/sentry-python-sdk`.

Refs #1554

Co-Authored-By: byk <[email protected]>
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 21, 2026 5:25pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 21, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b9def56. Configure here.

Comment thread packages/cli/src/lib/org-list.ts Outdated
Comment thread packages/cli/src/lib/org-list.ts Outdated
A name filter on `<org>/` went through `listForOrg`, which for teams,
repositories and integrations returns only the first API page, so later
matches were dropped. It also used `fetchOrgSafe`, which turns a missing
org, 403 or network failure into an empty "no matches" result.

With a filter, the default handlers now walk every page of
`listPaginated`, and org-all mode lets API errors propagate as the
unfiltered `<org>/` listing does.

This branch was previously deployed

1 inactive deployment
Preview — 1e97a533 Deployed Oct 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants