Repository navigation
ref(cli): Parse list command targets in their positional - #1711
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
List commands declared their target with an identity parser and called
parseOrgProjectArg or parseListTarget inside func. They now use a
listTarget bound positional: the scanner parses [<org>/][<project>]
(and name globs, comma-separated projects where the command takes
them) without side effects, and target.resolved applies a pasted
Sentry URL's server, after the auth guard, before func hands
{ parsed, filter } to dispatchOrgScopedList.
parseListTarget becomes the pure parseListTargetInput, which returns
the URL's server instead of applying it.
Refs #1564
Co-Authored-By: BYK <burak.kaya@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This was referenced Oct 29, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1564. This brings list commands onto bound target positionals, the design agreed in the #1564 status comment.
List commands used to declare their target with an identity parser and then call
parseOrgProjectArgorparseListTargetinsidefunc. NowlistTargetPositional()inlist-command.tsbuilds the positional on a newlistTargetparser intarget-positional.ts:[<org>/][<project>], plus name globs and comma-separated projects for the commands that accept them.await target.resolvedapplies a pasted Sentry URL's server, after the auth guard, and returns{ parsed, filter }.funcpasses those todispatchOrgScopedList, which still resolves each target mode the same way as before.parseListTargetis replaced byparseListTargetInput, which has no side effects. LikeparseOrgProjectInput, it returns the URL's server instead of applying it.require-target-resolutionlint rule now also coversListCommandTarget.Migrated commands
buildOrgListCommand:team list,repo list,monitor list,integration list.issue list(comma-separated projects).project list(name globs and comma-separated projects).release list,dsn list,alert issues list.issue liststill rejectsissue-1-style targets insidefunc. It now checkstarget.raw, so the error and exit code are the same as before.Behavior change: a malformed list target, such as
sentry team list @latest, now fails in the argument scanner with exit code 252. Before, it failed insidefuncwith a validation error.via BYK.
--
View Junior Session in Sentry