* Limit items to max count * @param {string[]} items - Items to limit * @param {number} maxCount - Maximum number of items * @returns {string[]} Limited items
(items, maxCount)
| 276 | * @returns {string[]} Limited items |
| 277 | */ |
| 278 | function limitToMaxCount(items, maxCount) { |
| 279 | if (items.length > maxCount) { |
| 280 | core.info(`Too many items (${items.length}), limiting to ${maxCount}`); |
| 281 | return items.slice(0, maxCount); |
| 282 | } |
| 283 | return items; |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * Process items through the standard pipeline: filter by allowed, filter blocked, sanitize, dedupe, limit |