Commit 1dd29a1
committed
fix: reject @-selectors in parseOrgProjectArg with helpful redirect
Fixes CLI-MH: 'Project @latest not found' when running 'sentry issues @latest'.
The @latest and @most_frequent magic selectors are only valid for
parseIssueArg (issue view/explain/plan), not for parseOrgProjectArg
(list commands). Previously, @ was not in RESOURCE_ID_FORBIDDEN so
'@latest' passed validation and entered project-search mode, leading
to a confusing ResolutionError.
Add rejectAtSelector() guard in:
- parseOrgProjectArg() bare-slug branch
- parseSlashOrgProject() both project slug branches (/@latest, org/@latest)
Known selectors get a redirect: 'Use: sentry issue view @latest'
Unknown @-prefixed values get: 'starts with @, slugs use letters/numbers/hyphens'1 parent 45cdd06 commit 1dd29a1
2 files changed
+83
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
421 | 453 | | |
422 | 454 | | |
423 | 455 | | |
| |||
435 | 467 | | |
436 | 468 | | |
437 | 469 | | |
| 470 | + | |
438 | 471 | | |
439 | 472 | | |
440 | 473 | | |
| |||
457 | 490 | | |
458 | 491 | | |
459 | 492 | | |
| 493 | + | |
460 | 494 | | |
461 | 495 | | |
462 | 496 | | |
| |||
508 | 542 | | |
509 | 543 | | |
510 | 544 | | |
| 545 | + | |
511 | 546 | | |
512 | 547 | | |
513 | 548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
254 | 302 | | |
255 | 303 | | |
256 | 304 | | |
| |||
0 commit comments