@@ -57,6 +57,7 @@ import {
5757 buildListCommand ,
5858 buildListLimitFlag ,
5959 LIST_BASE_ALIASES ,
60+ LIST_MAX_LIMIT ,
6061 LIST_TARGET_POSITIONAL ,
6162 paginationHint ,
6263 parseCursorFlag ,
@@ -132,12 +133,6 @@ const VALID_SORT_VALUES: SortValue[] = ["date", "new", "freq", "user"];
132133/** Usage hint for ContextError messages */
133134const USAGE_HINT = "sentry issue list <org>/<project>" ;
134135
135- /**
136- * Maximum --limit value (user-facing ceiling for practical CLI response times).
137- * Auto-pagination can theoretically fetch more, but 1000 keeps responses reasonable.
138- */
139- const MAX_LIMIT = 1000 ;
140-
141136/** Options returned by {@link buildListApiOptions}. */
142137type ListApiOptions = {
143138 /** Fields to collapse (omit) from the API response for performance. */
@@ -1374,7 +1369,7 @@ async function handleResolvedTargets(
13741369
13751370 let moreHint : string | undefined ;
13761371 if ( hasMoreToShow ) {
1377- const higherLimit = Math . min ( flags . limit * 2 , MAX_LIMIT ) ;
1372+ const higherLimit = Math . min ( flags . limit * 2 , LIST_MAX_LIMIT ) ;
13781373 const canIncreaseLimit = higherLimit > flags . limit ;
13791374 const actionParts : string [ ] = [ ] ;
13801375 if ( canIncreaseLimit ) {
@@ -1429,7 +1424,7 @@ export const __testing = {
14291424 compareDates,
14301425 parseSort,
14311426 CURSOR_SEP ,
1432- MAX_LIMIT ,
1427+ MAX_LIMIT : LIST_MAX_LIMIT ,
14331428 VALID_SORT_VALUES ,
14341429} ;
14351430
@@ -1542,7 +1537,7 @@ export const listCommand = buildListCommand("issue", {
15421537 brief : "Search query (Sentry search syntax)" ,
15431538 optional : true ,
15441539 } ,
1545- limit : buildListLimitFlag ( "issues" , "25" ) ,
1540+ limit : buildListLimitFlag ( "issues" ) ,
15461541 sort : {
15471542 kind : "parsed" ,
15481543 parse : parseSort ,
@@ -1586,9 +1581,9 @@ export const listCommand = buildListCommand("issue", {
15861581 if ( flags . limit < 1 ) {
15871582 throw new ValidationError ( "--limit must be at least 1." , "limit" ) ;
15881583 }
1589- if ( flags . limit > MAX_LIMIT ) {
1584+ if ( flags . limit > LIST_MAX_LIMIT ) {
15901585 throw new ValidationError (
1591- `--limit cannot exceed ${ MAX_LIMIT } . ` +
1586+ `--limit cannot exceed ${ LIST_MAX_LIMIT } . ` +
15921587 "Use --cursor to paginate through larger result sets." ,
15931588 "limit"
15941589 ) ;
0 commit comments