Commit bc6c5fc
authored
## Summary
Fixes `buildCommandHint()` producing nonsensical error hints when the
user-provided issue arg already contains a slash.
### Bug (CLI-8C — 50 events, 8 users)
When a user passes `saber-ut/103103195` to `sentry issue view`, the
error path calls `buildCommandHint("view", "saber-ut/103103195")`. Since
the input contains a dash, it fell through to the final branch and
produced:
```
sentry issue view <org>/saber-ut/103103195
```
This is wrong — the user already provided the org prefix `saber-ut`.
### Fix
Add an early check: if the input already contains a `/`, it has org
context embedded — show it as-is without adding another `<org>/` prefix.
### Test cases added
- `saber-ut/103103195` → `sentry issue view saber-ut/103103195`
- `sentry/cli-G` → `sentry issue view sentry/cli-G`
- `sentry/cli/CLI-A1` → `sentry issue explain sentry/cli/CLI-A1`
1 parent 5e5a4e6 commit bc6c5fc
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
59 | 74 | | |
60 | 75 | | |
61 | 76 | | |
| |||
0 commit comments