Repository navigation
test(cli): Check dashboard and issue search arguments across commands - #1742
Merged
Merged
Conversation
Add the dashboard commands migrated to the shared ID grammar in #1730 to the argument conventions suite: view, restore, revisions, and widget edit, delete, and add must read every dashboard input the same way, and dashboard list keeps its own target-and-filter reading. Issue commands now also agree on text with spaces, which is a search.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
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.
Part of #1564. Follow-up to #1730 and #1739.
#1739 added
argument-conventions.test.ts, which checks that commands sharing a parser read the same input the same way. #1730 then moved dashboards and issues onto the shared ID grammar, and dashboards and issues weren't in that test yet. This adds them. It only changespackages/cli/test/lib/argument-conventions.test.ts.Dashboard commands:
view,restore,revisions, andwidget add/edit/deletemust all read everyDASHBOARD_INPUTSentry the same waydashboard viewdoes:<org>/<id>,<org>/<project>/<id>, a separate target,<target> <title words…>, the bare-org fallback (My Dashboard), reversed arguments, extra arguments, and dashboard and org URLs.widget add's own widget title is removed first.widget addonly gets inputs of up to 2 arguments, because its last argument is the widget title.widget addsplits off its title, andwidget addrejects more than 3 arguments.dashboard list: its own block, because it reads a target plus a title filter, not a dashboard. A dashboard URL fails with a suggestion to usedashboard view.Issue commands:
ISSUE_INPUTSgainslogin timeout, so every issue command must read search text the same wayissue resolvedoes. A separate test checks that it parses as{ type: "search" }.No lint allow-list changes: #1730 already removed the dashboard entries. The
issue/utils.tsandissue/merge.tsentries are still in use and get migrated separately.Verification:
argument-conventions.test.ts: 336 passed, 19 skipped.pnpm run lintin packages/cli is clean,tsc --noEmitis clean, andscripts/cli-lint-rules.test.mjspasses 70/70.via BYK.
--
View Junior Session in Sentry